<!doctype html>
<html 
      lang="en"
      dir="ltr">
  <head>
    <meta name="google-signin-client-id" content="721724668570-nbkv1cfusk7kk4eni4pjvepaus73b13t.apps.googleusercontent.com">
    <meta name="google-signin-scope"
          content="profile email https://www.googleapis.com/auth/developerprofiles https://www.googleapis.com/auth/developerprofiles.award">
    <meta property="og:site_name" content="Android Developers">
    <meta property="og:type" content="website"><meta name="theme-color" content="#3ddc84"><meta charset="utf-8">
    <meta content="IE=Edge" http-equiv="X-UA-Compatible">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    

    <link rel="manifest" href="/_pwa/android/manifest.json"
          crossorigin="use-credentials">
    <link rel="preconnect" href="//www.gstatic.com" crossorigin>
    <link rel="preconnect" href="//fonts.gstatic.com" crossorigin>
    <link rel="preconnect" href="//fonts.googleapis.com" crossorigin>
    <link rel="preconnect" href="//apis.google.com" crossorigin>
    <link rel="preconnect" href="//www.google-analytics.com" crossorigin><link rel="stylesheet" href="//fonts.googleapis.com/css?family=Google+Sans:400,500,600,700|Google+Sans+Text:400,400italic,500,500italic,600,600italic,700,700italic|Roboto+Mono:400,500,700&display=swap">
      <link rel="stylesheet"
            href="//fonts.googleapis.com/css2?family=Material+Icons&family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=block"><link rel="stylesheet" href="https://www.gstatic.com/devrel-devsite/prod/va65162e8ce9aacc75e4d3c0cd6d166fc6ceaaf184fea0ff0eac1d9b62c0480be/android/css/rebrand-app.css">
      <link rel="shortcut icon" href="https://www.gstatic.com/devrel-devsite/prod/va65162e8ce9aacc75e4d3c0cd6d166fc6ceaaf184fea0ff0eac1d9b62c0480be/android/images/rebrand/favicon.svg">
    <link rel="apple-touch-icon" href="https://www.gstatic.com/devrel-devsite/prod/va65162e8ce9aacc75e4d3c0cd6d166fc6ceaaf184fea0ff0eac1d9b62c0480be/android/images/rebrand/touchicon-180.png"><link rel="canonical" href="https://developer.android.com/reference/android/telephony/data/ApnSetting.Builder"><link rel="search" type="application/opensearchdescription+xml"
            title="Android Developers" href="https://developer.android.com/s/opensearch.xml">
      <link rel="alternate" hreflang="en"
          href="https://developer.android.com/reference/android/telephony/data/ApnSetting.Builder" /><link rel="alternate" hreflang="x-default" href="https://developer.android.com/reference/android/telephony/data/ApnSetting.Builder" /><title>ApnSetting.Builder &nbsp;|&nbsp; Android Developers</title>

<meta property="og:title" content="ApnSetting.Builder &nbsp;|&nbsp; Android Developers"><meta property="og:url" content="https://developer.android.com/reference/android/telephony/data/ApnSetting.Builder"><meta property="og:image" content="https://developer.android.com/static/images/social/android-developers.png">
  <meta property="og:image:width" content="1200">
  <meta property="og:image:height" content="675"><meta property="og:locale" content="en"><meta name="twitter:card" content="summary_large_image">
  
  
      
  
  
  
  




    
      <link rel="stylesheet" href="/extras.css"></head>
  <body class=""
        template="page"
        theme="android-theme"
        type="reference"
        
        
        
        layout="docs"
        
        
        
        
        display-toc
        pending>
    <devsite-progress type="indeterminate" id="app-progress"></devsite-progress>
  
    <section class="devsite-wrapper">
      <section id="gc-wrapper">
        <main role="main" class="devsite-main-content"
            
              has-book-nav
              has-sidebar
            >
          
          
          <div class="devsite-sidebar">
            <div class="devsite-sidebar-content">
                
                <devsite-toc class="devsite-nav"
                            role="navigation"
                            aria-label="On this page"
                            depth="2"
                            scrollbars
                  ></devsite-toc>
                <devsite-recommendations-sidebar class="nocontent devsite-nav">
                </devsite-recommendations-sidebar>
            </div>
          </div>
          
          <devsite-content>
            
              











<article class="devsite-article"><style>
      /* Styles inlined from /assets/css/reference-docs.css */
:root {
  --primary-font-family: Google Sans Text, Noto Sans, Noto Sans JP,
    Noto Sans KR, Noto Naskh Arabic, Noto Sans Thai, Noto Sans Hebrew,
    Noto Sans Bengali, sans-serif;
}

/* the "added in" info on all APIs */
.api-level {
  float: right;
  font-size: smaller;
  margin-top: -40px;
}

/* the "added in" block at the top of the page */
#api-info-block .api-level {
  margin-top: 0;
}

/* The metadata block displayed at the top of the page and on
   methods/functions. Used by Dackka */
#metadata-info-block {
  font-size: smaller;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

#header-block {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

/* The version metadata block contains "Added in" and "Deprecated in" lines,
   which should both be right-aligned. Used by Dackka. */
#version-metadata > div {
  text-align: end;
}

/* The block containing a method name and its associated metadata. Used by
   Dackka */
.api-name-block {
  display: flex;
  flex-direction: row;
  justify-content: space-between;

  /* These margins reflect the margins set for non-Dackka generated refdocs */
  margin-top: 60px;
  margin-bottom: 16px;
}

/* The block next to a method / function name in the details section that
   displays the platform icons and the metadata block. Used by Dackka */
.api-name-platform-and-metadata {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
}

/* The platform icons that are displayed next to a method / function name in the
   details section. Used by Dackka */
.api-name-platform-icons {
  display: flex;
}

/* Zero out the top and bottom margins of the h3 contained in api-name-block;
   these margins are set in [the parent] .api-name-block div, since that also
   contains additional information that needs to be aligned with the h3. */
.api-name-block h3 {
  margin-top: 0;
  margin-bottom: 0;
}

@media screen and (max-width: 1000px) {
  .api-level {
    float: none;
    margin-top: 0;
  }
  #api-info-block .api-level {
    margin-bottom: 20px;
  }
}

.api-level a,
.api-level a:active,
.api-level a:visited {
  color: #222;
}

.api-level a:hover {
  color: #888;
}

/* This element is obsolete now that devsite provides TOC */
#api-info-block .sum-details-links {
  display: none;
}


/* The table that shows this class's inheritance tree */

.jd-inheritance-table tr,
.jd-inheritance-table tr td {
  background-color: transparent;
  border: none;
  margin: 0;
  padding: 0;
}

.jd-inheritance-table .jd-inheritance-space {
  width: 2em;
}

/* The devsite expandable widget */

.expand-control:not(button):not(.button) {
  color: inherit;
  cursor: pointer;
  padding-left: 24px;
  position: relative;
}

.expand-control::before {
  background: url(/images/styles/disclosure_down.png) no-repeat center center;
  background-size: 34px 34px;
  color: transparent;
  content: '';
  display: block;
  height: 20px;
  left: 0;
  position: absolute;
  width: 20px;
}

.expand-control.exw-expanded::before {
  background: url(/images/styles/disclosure_up.png) no-repeat center center;
}

/* Known subclasses list */

.jd-sumtable-subclasses #subclasses-direct,
.jd-sumtable-subclasses #subclasses-indirect {
  /* left margin matches width of the toggle image,
     so this section aligns with the text above */
  margin: 0 0 0 24px;
}

.jd-sumtable-subclasses .expand-control.exw-expanded + .showalways {
  /* Hide the comma list when expanded to show the table */
  display: none;
}

.jd-sumtable-subclasses tr,
.jd-sumtable-subclasses td {
  background-color: transparent;
  border: none;
  margin: 0;
  padding: 0;
}

#subclasses-direct-summary,
#subclasses-indirect-summary {
  padding-left: 24px;
}

.jd-sumtable-expando td {
  border: solid 1px #ddd;
  padding: 4px;
}

.jd-inherited-apis .exw-expanded-content {
  /* Force override for some lengthy devsite style selectors */
  padding-left: 24px !important;
  margin-top: 12px !important;
}


/* Styles for legacy doclava HTML that uses custom expando.
 * The list of direct/indirect subclasses does not expand at all,
 * and the list of inherited members/methods is expanded by default. */

.jd-sumtable-subclasses #subclasses-direct-list,
.jd-sumtable-subclasses #subclasses-indirect-list {
  /* Force line-wraps for CSVs with no spaces */
  word-break: break-word;
}

:not(devsite-expandable) > #subclasses-direct-summary,
:not(devsite-expandable) > #subclasses-indirect-summary {
  display: none !important;
}

.jd-sumtable #subclasses-direct.jd-expando-trigger,
.jd-sumtable #subclasses-indirect.jd-expando-trigger{
  margin: 0;
}


/* Force the broken legacy expandos into something that looks WAI */

.jd-expando-trigger {
  display: inline-block;
  height: 0;
  margin: 0;
  padding-top: 10px;
  width: 24px;
}

.jd-expando-trigger img {
  /* display: none; */
  height: inherit;
}

.jd-expando-trigger ~ div > div {
  display: block !important; /* Force all inline-hidden divs to appear */
}

table.responsive td td:first-child,
table.responsive td tr:last-child td,
table.responsive td tr:first-child td{
  padding: 7px 8px 8px;
}

.data-reference-resources-wrapper {
  display: none;
}

#lattrs td:first-child,
.inhtable td:first-child {
  white-space: nowrap;
}

#lattrs td+td,
.inhtable td+td {
  white-space: normal;
}


/* Styles to highlight the preview APIs.

   These must be updated with each letter-appropriate preview. */

/* Style headings to gold preview color */
#jd-content:not(.devsite-future-version) .apilevel-UpsideDownCake:not(.devsite-future-version) h3,
#jd-content:not(.devsite-future-version) [data-version-added="UpsideDownCake"]:not(.devsite-future-version) h3,
[data-version-added="UpsideDownCake"] .api-title,
.apilevel-UpsideDownCake h3 {
  color: #f5ba15;
}

/* Style "Added in ___" links to gold preview color */
#jd-content:not(.devsite-future-version) .apilevel-UpsideDownCake:not(.devsite-future-version) .api-level a,
body.apilevel-UpsideDownCake #api-info-block .api-level a,
#jd-content[data-version-added="UpsideDownCake"]:not(.devsite-future-version) .api-level a,
#api-info-block .api-level a[data-version-added="UpsideDownCake"],
.api-level a[data-version-added="UpsideDownCake"],
.apilevel-UpsideDownCake .api-level a {
  color: #f5ba15 !important;
  font-size: 14px;
  font-weight:900;
}

/* Clear backgrounds for table rows */
#jd-content:not(.devsite-future-version) tr.apilevel-UpsideDownCake:not(.devsite-future-version),
#jd-content:not(.devsite-future-version) .apilevel-UpsideDownCake:not(.devsite-future-version) tr,
table:not(.jd-inheritance-table):not(.jd-sumtable-subclasses) tr.apilevel-UpsideDownCake:not(.devsite-future-version),
body.apilevel-UpsideDownCake #jd-content table:not(.jd-inheritance-table):not(.jd-sumtable-subclasses) tr,
#jd-content:not(.devsite-future-version) tr[data-version-added="UpsideDownCake"]:not(.devsite-future-version),
#jd-content:not(.devsite-future-version) [data-version-added="UpsideDownCake"]:not(.devsite-future-version) tr,
table:not(.jd-inheritance-table):not(.jd-sumtable-subclasses) tr[data-version-added="UpsideDownCake"]:not(.devsite-future-version),
#jd-content[data-version-added="UpsideDownCake"] table:not(.jd-inheritance-table):not(.jd-sumtable-subclasses) tr {
  background: none;
}

/* Add gold preview background color to table headings and cells */
#jd-content:not(.devsite-future-version) .apilevel-UpsideDownCake:not(.devsite-future-version) td,
#jd-content:not(.devsite-future-version) .apilevel-UpsideDownCake:not(.devsite-future-version) th,
body.apilevel-UpsideDownCake #jd-content:not(.devsite-future-version) table:not(.jd-inheritance-table):not(.jd-sumtable-subclasses) tr:not(.devsite-future-version) td,
body.apilevel-UpsideDownCake #jd-content:not(.devsite-future-version) th,
#jd-content:not(.devsite-future-version) [data-version-added="UpsideDownCake"]:not(.devsite-future-version) td,
#jd-content:not(.devsite-future-version) [data-version-added="UpsideDownCake"]:not(.devsite-future-version) th,
#jd-content[data-version-added="UpsideDownCake"]:not(.devsite-future-version) table:not(.jd-inheritance-table):not(.jd-sumtable-subclasses) tr:not(.devsite-future-version) td,
#jd-content[data-version-added="UpsideDownCake"]:not(.devsite-future-version) th {
  background: rgba(245, 185, 16, .2);
}

/* Add gold preview background color to additional table cells */
#jd-content:not(.devsite-future-version) tr.apilevel-UpsideDownCake:not(.devsite-future-version) td,
table:not(.jd-inheritance-table):not(.jd-sumtable-subclasses) .apilevel-UpsideDownCake:not(.devsite-future-version) td,
#jd-content:not(.devsite-future-version) tr[data-version-added="UpsideDownCake"]:not(.devsite-future-version) td,
table:not(.jd-inheritance-table):not(.jd-sumtable-subclasses) [data-version-added="UpsideDownCake"]:not(.devsite-future-version) td {
  background: rgba(245, 185, 16, .2);
}

/* End of styles to highlight the preview APIs */


/* Misc styles used in the reference */

h1.api-title {
  margin-bottom: 0;
}

h2.api-section:not(#summary) {
  margin-top: 60px;
  margin-bottom: -20px;
}

h3.api-name {
  margin-top: 60px;
}

.nolist, .nolist ul, .nolist ol {
  list-style: none;
  padding-left: 0;
}

table.inhtable>tbody>tr>td {
  padding-left: 0;
}

table.inhtable>tbody>tr>td div:first-of-type {
  padding-left: 12px;
}

.api-item {
  position: relative;
}

.api-item > .api-name {
  padding-right: 80px;
}

.api-item > .kotlin-platform {
  inset-inline-end: 0;
  position: absolute;
  top: 0;
}

.kotlin-platform {
  background: #ebf7fe;
  border-radius: 16px;
  color: #1769e0;
  display: inline-block;
  font: 500 12px / 32px var(--primary-font-family);
  height: 32px;
  text-align: center;
  width: 32px;
}

      </style>
  
  
  
  

  <div class="devsite-article-meta nocontent" role="navigation">
    
    
    <ul class="devsite-breadcrumb-list"
  
    aria-label="Breadcrumb">
  
  <li class="devsite-breadcrumb-item
             ">
    
    
    
      
  <a href="https://developer.android.com/"
      
        class="devsite-breadcrumb-link gc-analytics-event"
      
        data-category="Site-Wide Custom Events"
      
        data-label="Breadcrumbs"
      
        data-value="1"
      
        track-type="globalNav"
      
        track-name="breadcrumb"
      
        track-metadata-position="1"
      
        track-metadata-eventdetail="Android Developers"
      
    >
    
        Android Developers
      
  </a>
  
    
  </li>
  
  <li class="devsite-breadcrumb-item
             ">
    
      
      <div class="devsite-breadcrumb-guillemet material-icons" aria-hidden="true"></div>
    
    
    
      
  <a href="https://developer.android.com/develop"
      
        class="devsite-breadcrumb-link gc-analytics-event"
      
        data-category="Site-Wide Custom Events"
      
        data-label="Breadcrumbs"
      
        data-value="2"
      
        track-type="globalNav"
      
        track-name="breadcrumb"
      
        track-metadata-position="2"
      
        track-metadata-eventdetail=""
      
    >
    
        Develop
      
  </a>
  
    
  </li>
  
  <li class="devsite-breadcrumb-item
             ">
    
      
      <div class="devsite-breadcrumb-guillemet material-icons" aria-hidden="true"></div>
    
    
    
      
  <a href="https://developer.android.com/reference"
      
        class="devsite-breadcrumb-link gc-analytics-event"
      
        data-category="Site-Wide Custom Events"
      
        data-label="Breadcrumbs"
      
        data-value="3"
      
        track-type="globalNav"
      
        track-name="breadcrumb"
      
        track-metadata-position="3"
      
        track-metadata-eventdetail=""
      
    >
    
        Reference
      
  </a>
  
    
  </li>
  
</ul>
    
      
    <devsite-thumb-rating position="header">
    </devsite-thumb-rating>
  
    
  </div>
  <devsite-feature-tooltip
          ack-key="AckCollectionsBookmarkTooltipDismiss"
          analytics-category="Site-Wide Custom Events"
          analytics-action-show="Callout Profile displayed"
          analytics-action-close="Callout Profile dismissed"
          analytics-label="Create Collection Callout"
          class="devsite-page-bookmark-tooltip nocontent"
          dismiss-button="true"
          id="devsite-collections-dropdown"

          
          dismiss-button-text="Dismiss"

          
          close-button-text="Got it">

        
        <devsite-bookmark></devsite-bookmark>

        <span slot="popout-heading">
          
          Stay organized with collections
        </span>
        <span slot="popout-contents">
          
          Save and categorize content based on your preferences.
        </span>
      </devsite-feature-tooltip>
    
  

  <devsite-toc class="devsite-nav"
    depth="2"
    devsite-toc-embedded
    >
  </devsite-toc>
  
    
    <devsite-recommendations-dropdown class="nocontent"></devsite-recommendations-dropdown>
    
  

  






<div class="devsite-article-body clearfix
  devsite-no-page-title">

  
    

<div itemscope itemtype="http://developers.google.com/ReferenceObject">
<!-- This DIV closes at the end of the BODY -->
  <meta itemprop="name" content="android.telephony.data.ApnSetting.Builder" />
  <meta itemprop="path" content="API level 28" />



<div id="naMessage"></div>

<div id="api-info-block">
<div class="api-level">
  
    Added in <a href="/guide/topics/manifest/uses-sdk-element#ApiLevels">API level 28</a>
  
  
  
  

</div>



  
   
  
  
  
  


<div class="sum-details-links">

Summary:









  <a href="#pubctors">Ctors</a>
  



  &#124; <a href="#pubmethods">Methods</a>
  



  &#124; <a href="#inhmethods">Inherited Methods</a>


</div><!-- end sum-details-links -->
</div><!-- end api-info-block -->

<div id="jd-content" data-version-added="28" >

<!-- ======== START OF CLASS DATA ======== -->

<h1 class="api-title" id="apnsetting.builder" data-text="ApnSetting.Builder">ApnSetting.Builder</h1>




























<div style="font-size:medium; margin-bottom:40px; border-top:1px solid black;"
     class="nocontent">
<div style="float:right">



<a href="/reference/kotlin/android/telephony/data/ApnSetting.Builder" title="View this page in Kotlin" >Kotlin</a>
<span style="color: #ddd; padding: 0em .5em;">|</span><span style="color: black; font-weight:bold">Java</span>


</div>
</div>




<p>
<code class="api-signature" translate="no" dir="ltr">
  public
  static
  
  
  class
  ApnSetting.Builder
</code>
<br>


<code class="api-signature" translate="no" dir="ltr">
  
    extends <a href="/reference/java/lang/Object">Object</a>
  
  
  
</code>

<code class="api-signature" translate="no" dir="ltr">
  
  
  
</code>

</p><table class="jd-inheritance-table">


  <tr>
    
    <td colspan="2" class="jd-inheritance-class-cell"><a href="/reference/java/lang/Object">java.lang.Object</a>
    </td>
  </tr>
  

  <tr>
    
      <td class="jd-inheritance-space">&nbsp;&nbsp;&nbsp;&#x21b3;</td>
    
    <td colspan="1" class="jd-inheritance-class-cell">android.telephony.data.ApnSetting.Builder
    </td>
  </tr>
  

</table>
  

    

<br><hr>


  <p>Provides a convenient way to set the fields of a <code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting">ApnSetting</a></code> when creating a new
 instance. The following settings are required to build an <code translate="no" dir="ltr">ApnSetting</code>:

 <ul><li>apnTypeBitmask</li>
 <li>apnName</li>
 <li>entryName</li></ul>

 <p>The example below shows how you might create a new <code translate="no" dir="ltr">ApnSetting</code>:

 <pre translate="no" dir="ltr"><code translate="no" dir="ltr">
 // Create an MMS proxy address with a hostname. A network might not be
 // available, so supply a placeholder (0.0.0.0) IPv4 address to avoid DNS lookup.
 String host = "mms.example.com";
 byte[] ipAddress = new byte[4];
 InetAddress mmsProxy;
 try {
   mmsProxy = InetAddress.getByAddress(host, ipAddress);
 } catch (UnknownHostException e) {
   e.printStackTrace();
   return;
 }

 ApnSetting apn = new ApnSetting.Builder()
     .setApnTypeBitmask(ApnSetting.TYPE_DEFAULT | ApnSetting.TYPE_MMS)
     .setApnName("apn.example.com")
     .setEntryName("Example Carrier APN")
     .setMmsc(Uri.parse("http://mms.example.com:8002"))
     .setMmsProxyAddress(mmsProxy)
     .setMmsProxyPort(8799)
     .build();
 </code></pre></p>









<h2 class="api-section" id="summary" data-text="Summary">Summary</h2>























<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<table id="pubctors" class="responsive constructors">
<tr><th colspan="2"><h3 id="public-constructors" data-text="Public constructors">Public constructors</h3></th></tr>



  <tr data-version-added="28" >
  
  
    <td width="100%">
      <code translate="no" dir="ltr">
      <a href="/reference/android/telephony/data/ApnSetting.Builder#Builder()">Builder</a>()
      </code>
      
        <p>Default constructor for Builder.
        
    
</p>
      
    </td>
  </tr>
  


</table>






<!-- ========== METHOD SUMMARY =========== -->
<table id="pubmethods" class="responsive methods">
<tr><th colspan="2"><h3 id="public-methods" data-text="Public methods">Public methods</h3></th></tr>



  <tr data-version-added="28" >
  
  
    <td><code translate="no" dir="ltr">
        
        
        
        
        
        <a href="/reference/android/telephony/data/ApnSetting">ApnSetting</a></code>
    </td>
  
    <td width="100%">
      <code translate="no" dir="ltr">
      <a href="/reference/android/telephony/data/ApnSetting.Builder#build()">build</a>()
      </code>
      
        <p>Builds <code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting">ApnSetting</a></code> from this builder.
        
    
</p>
      
    </td>
  </tr>
  

  <tr data-version-added="28" >
  
  
    <td><code translate="no" dir="ltr">
        
        
        
        
        
        <a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a></code>
    </td>
  
    <td width="100%">
      <code translate="no" dir="ltr">
      <a href="/reference/android/telephony/data/ApnSetting.Builder#setApnName(java.lang.String)">setApnName</a>(<a href="/reference/java/lang/String">String</a> apnName)
      </code>
      
        <p>Sets the name of the APN.
        
    
</p>
      
    </td>
  </tr>
  

  <tr data-version-added="28" >
  
  
    <td><code translate="no" dir="ltr">
        
        
        
        
        
        <a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a></code>
    </td>
  
    <td width="100%">
      <code translate="no" dir="ltr">
      <a href="/reference/android/telephony/data/ApnSetting.Builder#setApnTypeBitmask(int)">setApnTypeBitmask</a>(int apnTypeBitmask)
      </code>
      
        <p>Sets the bitmask of APN types.
        
    
</p>
      
    </td>
  </tr>
  

  <tr data-version-added="28" >
  
  
    <td><code translate="no" dir="ltr">
        
        
        
        
        
        <a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a></code>
    </td>
  
    <td width="100%">
      <code translate="no" dir="ltr">
      <a href="/reference/android/telephony/data/ApnSetting.Builder#setAuthType(int)">setAuthType</a>(int authType)
      </code>
      
        <p>Sets the authentication type of the APN.
        
    
</p>
      
    </td>
  </tr>
  

  <tr data-version-added="28" >
  
  
    <td><code translate="no" dir="ltr">
        
        
        
        
        
        <a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a></code>
    </td>
  
    <td width="100%">
      <code translate="no" dir="ltr">
      <a href="/reference/android/telephony/data/ApnSetting.Builder#setCarrierEnabled(boolean)">setCarrierEnabled</a>(boolean carrierEnabled)
      </code>
      
        <p>Sets the current status for this APN.
        
    
</p>
      
    </td>
  </tr>
  

  <tr data-version-added="29" >
  
  
    <td><code translate="no" dir="ltr">
        
        
        
        
        
        <a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a></code>
    </td>
  
    <td width="100%">
      <code translate="no" dir="ltr">
      <a href="/reference/android/telephony/data/ApnSetting.Builder#setCarrierId(int)">setCarrierId</a>(int carrierId)
      </code>
      
        <p>Sets the carrier id for this APN.
        
    
</p>
      
    </td>
  </tr>
  

  <tr data-version-added="28" >
  
  
    <td><code translate="no" dir="ltr">
        
        
        
        
        
        <a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a></code>
    </td>
  
    <td width="100%">
      <code translate="no" dir="ltr">
      <a href="/reference/android/telephony/data/ApnSetting.Builder#setEntryName(java.lang.String)">setEntryName</a>(<a href="/reference/java/lang/String">String</a> entryName)
      </code>
      
        <p>Sets a human-readable name that describes the APN.
        
    
</p>
      
    </td>
  </tr>
  

  <tr data-version-added="28" data-version-deprecated="29" >
  
  
    <td><code translate="no" dir="ltr">
        
        
        
        
        
        <a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a></code>
    </td>
  
    <td width="100%">
      <code translate="no" dir="ltr">
      <a href="/reference/android/telephony/data/ApnSetting.Builder#setMmsProxyAddress(java.net.InetAddress)">setMmsProxyAddress</a>(<a href="/reference/java/net/InetAddress">InetAddress</a> mmsProxy)
      </code>
      
        <p><em>
      This method was deprecated
      in API level 29.
    use <code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting.Builder#setMmsProxyAddress(java.lang.String)">setMmsProxyAddress(java.lang.String)</a></code> instead.</em>
        
    
</p>
      
    </td>
  </tr>
  

  <tr data-version-added="29" >
  
  
    <td><code translate="no" dir="ltr">
        
        
        
        
        
        <a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a></code>
    </td>
  
    <td width="100%">
      <code translate="no" dir="ltr">
      <a href="/reference/android/telephony/data/ApnSetting.Builder#setMmsProxyAddress(java.lang.String)">setMmsProxyAddress</a>(<a href="/reference/java/lang/String">String</a> mmsProxy)
      </code>
      
        <p>Sets the MMS proxy address of the APN.
        
    
</p>
      
    </td>
  </tr>
  

  <tr data-version-added="28" >
  
  
    <td><code translate="no" dir="ltr">
        
        
        
        
        
        <a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a></code>
    </td>
  
    <td width="100%">
      <code translate="no" dir="ltr">
      <a href="/reference/android/telephony/data/ApnSetting.Builder#setMmsProxyPort(int)">setMmsProxyPort</a>(int mmsPort)
      </code>
      
        <p>Sets the MMS proxy port of the APN.
        
    
</p>
      
    </td>
  </tr>
  

  <tr data-version-added="28" >
  
  
    <td><code translate="no" dir="ltr">
        
        
        
        
        
        <a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a></code>
    </td>
  
    <td width="100%">
      <code translate="no" dir="ltr">
      <a href="/reference/android/telephony/data/ApnSetting.Builder#setMmsc(android.net.Uri)">setMmsc</a>(<a href="/reference/android/net/Uri">Uri</a> mmsc)
      </code>
      
        <p>Sets the MMSC Uri of the APN.
        
    
</p>
      
    </td>
  </tr>
  

  <tr data-version-added="33" >
  
  
    <td><code translate="no" dir="ltr">
        
        
        
        
        
        <a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a></code>
    </td>
  
    <td width="100%">
      <code translate="no" dir="ltr">
      <a href="/reference/android/telephony/data/ApnSetting.Builder#setMtuV4(int)">setMtuV4</a>(int mtuV4)
      </code>
      
        <p>Set the default MTU (Maximum Transmission Unit) size in bytes of the IPv4 routes brought
 up by this APN setting.
        
    
</p>
      
    </td>
  </tr>
  

  <tr data-version-added="33" >
  
  
    <td><code translate="no" dir="ltr">
        
        
        
        
        
        <a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a></code>
    </td>
  
    <td width="100%">
      <code translate="no" dir="ltr">
      <a href="/reference/android/telephony/data/ApnSetting.Builder#setMtuV6(int)">setMtuV6</a>(int mtuV6)
      </code>
      
        <p>Set the default MTU (Maximum Transmission Unit) size in bytes of the IPv6 routes brought
 up by this APN setting.
        
    
</p>
      
    </td>
  </tr>
  

  <tr data-version-added="28" >
  
  
    <td><code translate="no" dir="ltr">
        
        
        
        
        
        <a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a></code>
    </td>
  
    <td width="100%">
      <code translate="no" dir="ltr">
      <a href="/reference/android/telephony/data/ApnSetting.Builder#setMvnoType(int)">setMvnoType</a>(int mvnoType)
      </code>
      
        <p>Sets the MVNO match type for this APN.
        
    
</p>
      
    </td>
  </tr>
  

  <tr data-version-added="28" >
  
  
    <td><code translate="no" dir="ltr">
        
        
        
        
        
        <a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a></code>
    </td>
  
    <td width="100%">
      <code translate="no" dir="ltr">
      <a href="/reference/android/telephony/data/ApnSetting.Builder#setNetworkTypeBitmask(int)">setNetworkTypeBitmask</a>(int networkTypeBitmask)
      </code>
      
        <p>Sets Radio Technology (Network Type) info for this APN.
        
    
</p>
      
    </td>
  </tr>
  

  <tr data-version-added="28" >
  
  
    <td><code translate="no" dir="ltr">
        
        
        
        
        
        <a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a></code>
    </td>
  
    <td width="100%">
      <code translate="no" dir="ltr">
      <a href="/reference/android/telephony/data/ApnSetting.Builder#setOperatorNumeric(java.lang.String)">setOperatorNumeric</a>(<a href="/reference/java/lang/String">String</a> operatorNumeric)
      </code>
      
        <p>Sets the numeric operator ID for the APN.
        
    
</p>
      
    </td>
  </tr>
  

  <tr data-version-added="28" >
  
  
    <td><code translate="no" dir="ltr">
        
        
        
        
        
        <a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a></code>
    </td>
  
    <td width="100%">
      <code translate="no" dir="ltr">
      <a href="/reference/android/telephony/data/ApnSetting.Builder#setPassword(java.lang.String)">setPassword</a>(<a href="/reference/java/lang/String">String</a> password)
      </code>
      
        <p>Sets the APN password of the APN.
        
    
</p>
      
    </td>
  </tr>
  

  <tr data-version-added="33" >
  
  
    <td><code translate="no" dir="ltr">
        
        
        
        
        
        <a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a></code>
    </td>
  
    <td width="100%">
      <code translate="no" dir="ltr">
      <a href="/reference/android/telephony/data/ApnSetting.Builder#setPersistent(boolean)">setPersistent</a>(boolean isPersistent)
      </code>
      
        <p>Set if the APN setting should be persistent/non-persistent in modem.
        
    
</p>
      
    </td>
  </tr>
  

  <tr data-version-added="33" >
  
  
    <td><code translate="no" dir="ltr">
        
        
        
        
        
        <a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a></code>
    </td>
  
    <td width="100%">
      <code translate="no" dir="ltr">
      <a href="/reference/android/telephony/data/ApnSetting.Builder#setProfileId(int)">setProfileId</a>(int profileId)
      </code>
      
        <p>Sets the profile id to which the APN saved in modem.
        
    
</p>
      
    </td>
  </tr>
  

  <tr data-version-added="28" >
  
  
    <td><code translate="no" dir="ltr">
        
        
        
        
        
        <a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a></code>
    </td>
  
    <td width="100%">
      <code translate="no" dir="ltr">
      <a href="/reference/android/telephony/data/ApnSetting.Builder#setProtocol(int)">setProtocol</a>(int protocol)
      </code>
      
        <p>Sets the protocol to use to connect to this APN.
        
    
</p>
      
    </td>
  </tr>
  

  <tr data-version-added="28" data-version-deprecated="29" >
  
  
    <td><code translate="no" dir="ltr">
        
        
        
        
        
        <a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a></code>
    </td>
  
    <td width="100%">
      <code translate="no" dir="ltr">
      <a href="/reference/android/telephony/data/ApnSetting.Builder#setProxyAddress(java.net.InetAddress)">setProxyAddress</a>(<a href="/reference/java/net/InetAddress">InetAddress</a> proxy)
      </code>
      
        <p><em>
      This method was deprecated
      in API level 29.
    use <code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting.Builder#setProxyAddress(java.lang.String)">setProxyAddress(java.lang.String)</a></code> instead.</em>
        
    
</p>
      
    </td>
  </tr>
  

  <tr data-version-added="29" >
  
  
    <td><code translate="no" dir="ltr">
        
        
        
        
        
        <a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a></code>
    </td>
  
    <td width="100%">
      <code translate="no" dir="ltr">
      <a href="/reference/android/telephony/data/ApnSetting.Builder#setProxyAddress(java.lang.String)">setProxyAddress</a>(<a href="/reference/java/lang/String">String</a> proxy)
      </code>
      
        <p>Sets the proxy address of the APN.
        
    
</p>
      
    </td>
  </tr>
  

  <tr data-version-added="28" >
  
  
    <td><code translate="no" dir="ltr">
        
        
        
        
        
        <a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a></code>
    </td>
  
    <td width="100%">
      <code translate="no" dir="ltr">
      <a href="/reference/android/telephony/data/ApnSetting.Builder#setProxyPort(int)">setProxyPort</a>(int port)
      </code>
      
        <p>Sets the proxy port of the APN.
        
    
</p>
      
    </td>
  </tr>
  

  <tr data-version-added="28" >
  
  
    <td><code translate="no" dir="ltr">
        
        
        
        
        
        <a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a></code>
    </td>
  
    <td width="100%">
      <code translate="no" dir="ltr">
      <a href="/reference/android/telephony/data/ApnSetting.Builder#setRoamingProtocol(int)">setRoamingProtocol</a>(int roamingProtocol)
      </code>
      
        <p>Sets the protocol to use to connect to this APN when the device is roaming.
        
    
</p>
      
    </td>
  </tr>
  

  <tr data-version-added="28" >
  
  
    <td><code translate="no" dir="ltr">
        
        
        
        
        
        <a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a></code>
    </td>
  
    <td width="100%">
      <code translate="no" dir="ltr">
      <a href="/reference/android/telephony/data/ApnSetting.Builder#setUser(java.lang.String)">setUser</a>(<a href="/reference/java/lang/String">String</a> user)
      </code>
      
        <p>Sets the APN username of the APN.
        
    
</p>
      
    </td>
  </tr>
  


</table>







<!-- ========== METHOD SUMMARY =========== -->
<table id="inhmethods" class="responsive methods inhtable">
<tr><th><h3 id="inherited-methods" data-text="Inherited methods">Inherited methods</h3></th></tr>


<tr  >
<td colspan="2">
  <div class="expandable jd-inherited-apis">
    <span class="expand-control">From class
      <code translate="no" dir="ltr">
        
          <a href="/reference/java/lang/Object">java.lang.Object</a>
        
      </code>
    </span>
    <table class="responsive">
      


  <tr data-version-added="1" >
  
  
    <td><code translate="no" dir="ltr">
        
        
        
        
        
        <a href="/reference/java/lang/Object">Object</a></code>
    </td>
  
    <td width="100%">
      <code translate="no" dir="ltr">
      <a href="/reference/java/lang/Object#clone()">clone</a>()
      </code>
      
        <p>Creates and returns a copy of this object.
        
    
</p>
      
    </td>
  </tr>
  

  <tr data-version-added="1" >
  
  
    <td><code translate="no" dir="ltr">
        
        
        
        
        
        boolean</code>
    </td>
  
    <td width="100%">
      <code translate="no" dir="ltr">
      <a href="/reference/java/lang/Object#equals(java.lang.Object)">equals</a>(<a href="/reference/java/lang/Object">Object</a> obj)
      </code>
      
        <p>Indicates whether some other object is "equal to" this one.
        
    
</p>
      
    </td>
  </tr>
  

  <tr data-version-added="1" >
  
  
    <td><code translate="no" dir="ltr">
        
        
        
        
        
        void</code>
    </td>
  
    <td width="100%">
      <code translate="no" dir="ltr">
      <a href="/reference/java/lang/Object#finalize()">finalize</a>()
      </code>
      
        <p>Called by the garbage collector on an object when garbage collection
 determines that there are no more references to the object.
        
    
</p>
      
    </td>
  </tr>
  

  <tr data-version-added="1" >
  
  
    <td><code translate="no" dir="ltr">
        
        
        
        final
        
        <a href="/reference/java/lang/Class">Class</a>&lt;?&gt;</code>
    </td>
  
    <td width="100%">
      <code translate="no" dir="ltr">
      <a href="/reference/java/lang/Object#getClass()">getClass</a>()
      </code>
      
        <p>Returns the runtime class of this <code translate="no" dir="ltr">Object</code>.
        
    
</p>
      
    </td>
  </tr>
  

  <tr data-version-added="1" >
  
  
    <td><code translate="no" dir="ltr">
        
        
        
        
        
        int</code>
    </td>
  
    <td width="100%">
      <code translate="no" dir="ltr">
      <a href="/reference/java/lang/Object#hashCode()">hashCode</a>()
      </code>
      
        <p>Returns a hash code value for the object.
        
    
</p>
      
    </td>
  </tr>
  

  <tr data-version-added="1" >
  
  
    <td><code translate="no" dir="ltr">
        
        
        
        final
        
        void</code>
    </td>
  
    <td width="100%">
      <code translate="no" dir="ltr">
      <a href="/reference/java/lang/Object#notify()">notify</a>()
      </code>
      
        <p>Wakes up a single thread that is waiting on this object's
 monitor.
        
    
</p>
      
    </td>
  </tr>
  

  <tr data-version-added="1" >
  
  
    <td><code translate="no" dir="ltr">
        
        
        
        final
        
        void</code>
    </td>
  
    <td width="100%">
      <code translate="no" dir="ltr">
      <a href="/reference/java/lang/Object#notifyAll()">notifyAll</a>()
      </code>
      
        <p>Wakes up all threads that are waiting on this object's monitor.
        
    
</p>
      
    </td>
  </tr>
  

  <tr data-version-added="1" >
  
  
    <td><code translate="no" dir="ltr">
        
        
        
        
        
        <a href="/reference/java/lang/String">String</a></code>
    </td>
  
    <td width="100%">
      <code translate="no" dir="ltr">
      <a href="/reference/java/lang/Object#toString()">toString</a>()
      </code>
      
        <p>Returns a string representation of the object.
        
    
</p>
      
    </td>
  </tr>
  

  <tr data-version-added="1" >
  
  
    <td><code translate="no" dir="ltr">
        
        
        
        final
        
        void</code>
    </td>
  
    <td width="100%">
      <code translate="no" dir="ltr">
      <a href="/reference/java/lang/Object#wait(long,%20int)">wait</a>(long timeoutMillis, int nanos)
      </code>
      
        <p>Causes the current thread to wait until it is awakened, typically
 by being <em>notified</em> or <em>interrupted</em>, or until a
 certain amount of real time has elapsed.
        
    
</p>
      
    </td>
  </tr>
  

  <tr data-version-added="1" >
  
  
    <td><code translate="no" dir="ltr">
        
        
        
        final
        
        void</code>
    </td>
  
    <td width="100%">
      <code translate="no" dir="ltr">
      <a href="/reference/java/lang/Object#wait(long)">wait</a>(long timeoutMillis)
      </code>
      
        <p>Causes the current thread to wait until it is awakened, typically
 by being <em>notified</em> or <em>interrupted</em>, or until a
 certain amount of real time has elapsed.
        
    
</p>
      
    </td>
  </tr>
  

  <tr data-version-added="1" >
  
  
    <td><code translate="no" dir="ltr">
        
        
        
        final
        
        void</code>
    </td>
  
    <td width="100%">
      <code translate="no" dir="ltr">
      <a href="/reference/java/lang/Object#wait()">wait</a>()
      </code>
      
        <p>Causes the current thread to wait until it is awakened, typically
 by being <em>notified</em> or <em>interrupted</em>.
        
    
</p>
      
    </td>
  </tr>
  


    </table>
  </div>
</td></tr>


</table>



<!-- XML Attributes -->


<!-- Enum Values -->


<!-- Constants -->


<!-- Fields -->


<!-- Public ctors -->


<!-- ========= CONSTRUCTOR DETAIL ======== -->
<h2 class="api-section" id="public-constructors_1" data-text="Public constructors">Public constructors</h2>


<div data-version-added="28">
    <h3 class="api-name" id="Builder()" data-text="Builder">Builder</h3>
    <div class="api-level">
      <div>
    Added in <a href="/guide/topics/manifest/uses-sdk-element#ApiLevels">API level 28</a>
  </div>
      
  

    </div>
<pre class="api-signature no-pretty-print" translate="no" dir="ltr">
public Builder ()</pre>
    
    

    
  <p>Default constructor for Builder.</p></p>

</div>





<!-- ========= CONSTRUCTOR DETAIL ======== -->
<!-- Protected ctors -->



<!-- ========= METHOD DETAIL ======== -->
<!-- Public methdos -->

<h2 class="api-section" id="public-methods_1" data-text="Public methods">Public methods</h2>


<div data-version-added="28">
    <h3 class="api-name" id="build()" data-text="build">build</h3>
    <div class="api-level">
      <div>
    Added in <a href="/guide/topics/manifest/uses-sdk-element#ApiLevels">API level 28</a>
  </div>
      
  

    </div>
<pre class="api-signature no-pretty-print" translate="no" dir="ltr">
public <a href="/reference/android/telephony/data/ApnSetting">ApnSetting</a> build ()</pre>
    
    

    
  <p>Builds <code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting">ApnSetting</a></code> from this builder.</p></p>
    <table class="responsive">
      <tr><th colspan=2>Returns</th></tr>
      <tr>
        <td><code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting">ApnSetting</a></code></td>
        <td width="100%"><code translate="no" dir="ltr">null</code> if <code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting.Builder#setApnName(java.lang.String)">setApnName(java.lang.String)</a></code> or <code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting.Builder#setEntryName(java.lang.String)">setEntryName(java.lang.String)</a></code>
 is empty, or <code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting.Builder#setApnTypeBitmask(int)">setApnTypeBitmask(int)</a></code> doesn't contain a valid bit,
 <code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting">ApnSetting</a></code> built from this builder otherwise.</p></td>
      </tr>
    </table>

</div>

<div data-version-added="28">
    <h3 class="api-name" id="setApnName(java.lang.String)" data-text="setApnName">setApnName</h3>
    <div class="api-level">
      <div>
    Added in <a href="/guide/topics/manifest/uses-sdk-element#ApiLevels">API level 28</a>
  </div>
      
  

    </div>
<pre class="api-signature no-pretty-print" translate="no" dir="ltr">
public <a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a> setApnName (<a href="/reference/java/lang/String">String</a> apnName)</pre>
    
    

    
  <p>Sets the name of the APN.</p></p>
    <table class="responsive">
    <tr><th colspan=2>Parameters</th></tr>
      <tr>
        <td><code translate="no" dir="ltr">apnName</code></td>
        <td width="100%">
          <code translate="no" dir="ltr">String</code>: the name to set for the APN
 
 This value may be <code translate="no" dir="ltr">null</code>.</p></td>
      </tr>
    </table>
    <table class="responsive">
      <tr><th colspan=2>Returns</th></tr>
      <tr>
        <td><code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a></code></td>
        <td width="100%">This value cannot be <code translate="no" dir="ltr">null</code>.</p></td>
      </tr>
    </table>

</div>

<div data-version-added="28">
    <h3 class="api-name" id="setApnTypeBitmask(int)" data-text="setApnTypeBitmask">setApnTypeBitmask</h3>
    <div class="api-level">
      <div>
    Added in <a href="/guide/topics/manifest/uses-sdk-element#ApiLevels">API level 28</a>
  </div>
      
  

    </div>
<pre class="api-signature no-pretty-print" translate="no" dir="ltr">
public <a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a> setApnTypeBitmask (int apnTypeBitmask)</pre>
    
    

    
  <p>Sets the bitmask of APN types.

 <p>Apn types are usage categories for an APN entry. One APN entry may support multiple
 APN types, eg, a single APN may service regular internet traffic ("default") as well as
 MMS-specific connections.

 <p>The bitmask of APN types is calculated from APN types defined in <code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting">ApnSetting</a></code>.</p></p>
    <table class="responsive">
    <tr><th colspan=2>Parameters</th></tr>
      <tr>
        <td><code translate="no" dir="ltr">apnTypeBitmask</code></td>
        <td width="100%">
          <code translate="no" dir="ltr">int</code>: a bitmask describing the types of the APN
 
 Value is either <code translate="no" dir="ltr">0</code> or a combination of <code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting#TYPE_DEFAULT">ApnSetting.TYPE_DEFAULT</a></code>, <code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting#TYPE_MMS">ApnSetting.TYPE_MMS</a></code>, <code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting#TYPE_SUPL">ApnSetting.TYPE_SUPL</a></code>, <code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting#TYPE_DUN">ApnSetting.TYPE_DUN</a></code>, <code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting#TYPE_HIPRI">ApnSetting.TYPE_HIPRI</a></code>, <code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting#TYPE_FOTA">ApnSetting.TYPE_FOTA</a></code>, <code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting#TYPE_IMS">ApnSetting.TYPE_IMS</a></code>, <code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting#TYPE_CBS">ApnSetting.TYPE_CBS</a></code>, <code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting#TYPE_IA">ApnSetting.TYPE_IA</a></code>, <code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting#TYPE_EMERGENCY">ApnSetting.TYPE_EMERGENCY</a></code>, <code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting#TYPE_MCX">ApnSetting.TYPE_MCX</a></code>, <code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting#TYPE_XCAP">ApnSetting.TYPE_XCAP</a></code>, <code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting#TYPE_BIP">ApnSetting.TYPE_BIP</a></code>, <code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting#TYPE_VSIM">ApnSetting.TYPE_VSIM</a></code>, and <code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting#TYPE_ENTERPRISE">ApnSetting.TYPE_ENTERPRISE</a></code></p></td>
      </tr>
    </table>
    <table class="responsive">
      <tr><th colspan=2>Returns</th></tr>
      <tr>
        <td><code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a></code></td>
        <td width="100%">This value cannot be <code translate="no" dir="ltr">null</code>.</p></td>
      </tr>
    </table>

</div>

<div data-version-added="28">
    <h3 class="api-name" id="setAuthType(int)" data-text="setAuthType">setAuthType</h3>
    <div class="api-level">
      <div>
    Added in <a href="/guide/topics/manifest/uses-sdk-element#ApiLevels">API level 28</a>
  </div>
      
  

    </div>
<pre class="api-signature no-pretty-print" translate="no" dir="ltr">
public <a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a> setAuthType (int authType)</pre>
    
    

    
  <p>Sets the authentication type of the APN.</p></p>
    <table class="responsive">
    <tr><th colspan=2>Parameters</th></tr>
      <tr>
        <td><code translate="no" dir="ltr">authType</code></td>
        <td width="100%">
          <code translate="no" dir="ltr">int</code>: the authentication type to set for the APN
 
 Value is android.telephony.data.ApnSetting.AUTH_TYPE_UNKNOWN, <code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting#AUTH_TYPE_NONE">ApnSetting.AUTH_TYPE_NONE</a></code>, <code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting#AUTH_TYPE_PAP">ApnSetting.AUTH_TYPE_PAP</a></code>, <code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting#AUTH_TYPE_CHAP">ApnSetting.AUTH_TYPE_CHAP</a></code>, or <code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting#AUTH_TYPE_PAP_OR_CHAP">ApnSetting.AUTH_TYPE_PAP_OR_CHAP</a></code></p></td>
      </tr>
    </table>
    <table class="responsive">
      <tr><th colspan=2>Returns</th></tr>
      <tr>
        <td><code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a></code></td>
        <td width="100%">This value cannot be <code translate="no" dir="ltr">null</code>.</p></td>
      </tr>
    </table>

</div>

<div data-version-added="28">
    <h3 class="api-name" id="setCarrierEnabled(boolean)" data-text="setCarrierEnabled">setCarrierEnabled</h3>
    <div class="api-level">
      <div>
    Added in <a href="/guide/topics/manifest/uses-sdk-element#ApiLevels">API level 28</a>
  </div>
      
  

    </div>
<pre class="api-signature no-pretty-print" translate="no" dir="ltr">
public <a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a> setCarrierEnabled (boolean carrierEnabled)</pre>
    
    

    
  <p>Sets the current status for this APN.</p></p>
    <table class="responsive">
    <tr><th colspan=2>Parameters</th></tr>
      <tr>
        <td><code translate="no" dir="ltr">carrierEnabled</code></td>
        <td width="100%">
          <code translate="no" dir="ltr">boolean</code>: the current status to set for this APN</p></td>
      </tr>
    </table>
    <table class="responsive">
      <tr><th colspan=2>Returns</th></tr>
      <tr>
        <td><code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a></code></td>
        <td width="100%">This value cannot be <code translate="no" dir="ltr">null</code>.</p></td>
      </tr>
    </table>

</div>

<div data-version-added="29">
    <h3 class="api-name" id="setCarrierId(int)" data-text="setCarrierId">setCarrierId</h3>
    <div class="api-level">
      <div>
    Added in <a href="/guide/topics/manifest/uses-sdk-element#ApiLevels">API level 29</a>
  </div>
      
  

    </div>
<pre class="api-signature no-pretty-print" translate="no" dir="ltr">
public <a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a> setCarrierId (int carrierId)</pre>
    
    

    
  <p>Sets the carrier id for this APN.

 See <code translate="no" dir="ltr"><a href="/reference/android/telephony/TelephonyManager#getSimCarrierId()">TelephonyManager#getSimCarrierId()</a></code> which provides more background for what a
 carrier ID is.</p></p>
    <table class="responsive">
    <tr><th colspan=2>Parameters</th></tr>
      <tr>
        <td><code translate="no" dir="ltr">carrierId</code></td>
        <td width="100%">
          <code translate="no" dir="ltr">int</code>: the carrier id to set for this APN</p></td>
      </tr>
    </table>
    <table class="responsive">
      <tr><th colspan=2>Returns</th></tr>
      <tr>
        <td><code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a></code></td>
        <td width="100%">This value cannot be <code translate="no" dir="ltr">null</code>.</p></td>
      </tr>
    </table>

</div>

<div data-version-added="28">
    <h3 class="api-name" id="setEntryName(java.lang.String)" data-text="setEntryName">setEntryName</h3>
    <div class="api-level">
      <div>
    Added in <a href="/guide/topics/manifest/uses-sdk-element#ApiLevels">API level 28</a>
  </div>
      
  

    </div>
<pre class="api-signature no-pretty-print" translate="no" dir="ltr">
public <a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a> setEntryName (<a href="/reference/java/lang/String">String</a> entryName)</pre>
    
    

    
  <p>Sets a human-readable name that describes the APN.</p></p>
    <table class="responsive">
    <tr><th colspan=2>Parameters</th></tr>
      <tr>
        <td><code translate="no" dir="ltr">entryName</code></td>
        <td width="100%">
          <code translate="no" dir="ltr">String</code>: the entry name to set for the APN
 
 This value may be <code translate="no" dir="ltr">null</code>.</p></td>
      </tr>
    </table>
    <table class="responsive">
      <tr><th colspan=2>Returns</th></tr>
      <tr>
        <td><code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a></code></td>
        <td width="100%">This value cannot be <code translate="no" dir="ltr">null</code>.</p></td>
      </tr>
    </table>

</div>

<div data-version-added="28" data-version-deprecated="29">
    <h3 class="api-name" id="setMmsProxyAddress(java.net.InetAddress)" data-text="setMmsProxyAddress">setMmsProxyAddress</h3>
    <div class="api-level">
      <div>
    Added in <a href="/guide/topics/manifest/uses-sdk-element#ApiLevels">API level 28</a>
  <br>Deprecated in
    <a href="/guide/topics/manifest/uses-sdk-element#ApiLevels">API level
      29</a>
  </div>
      
  

    </div>
<pre class="api-signature no-pretty-print" translate="no" dir="ltr">
public <a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a> setMmsProxyAddress (<a href="/reference/java/net/InetAddress">InetAddress</a> mmsProxy)</pre>
    
    

    <p>
  <p class="caution"><strong>
      This method was deprecated
      in API level 29.</strong><br/>
    use <code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting.Builder#setMmsProxyAddress(java.lang.String)">setMmsProxyAddress(java.lang.String)</a></code> instead.
  </p>
  <p>Sets the address of an MMS proxy for the APN. The MMS proxy address can be an IP address
 or hostname. If <code translate="no" dir="ltr">mmsProxy</code> contains both an IP address and hostname, this method
 ignores the IP address.

 <p>The <code translate="no" dir="ltr"><a href="/reference/java/net/InetAddress">InetAddress</a></code> methods
 <code translate="no" dir="ltr"><a href="/reference/java/net/InetAddress#getByName(java.lang.String)">getByName()</a></code> and
 <code translate="no" dir="ltr"><a href="/reference/java/net/InetAddress#getAllByName(java.lang.String)">getAllByName()</a></code> require DNS for hostname
 resolution. To avoid this requirement when setting a hostname, call
 <code translate="no" dir="ltr"><a href="/reference/java/net/InetAddress#getByAddress(java.lang.String,%20byte[])">InetAddress.getByAddress(java.lang.String, byte[])</a></code> with both the
 hostname and a placeholder IP address. See <code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting.Builder">above</a></code> for an
 example.</p></p>
    <table class="responsive">
    <tr><th colspan=2>Parameters</th></tr>
      <tr>
        <td><code translate="no" dir="ltr">mmsProxy</code></td>
        <td width="100%">
          <code translate="no" dir="ltr">InetAddress</code>: the MMS proxy address to set for the APN</p></td>
      </tr>
    </table>
    <table class="responsive">
      <tr><th colspan=2>Returns</th></tr>
      <tr>
        <td><code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a></code></td>
        <td width="100%"><!-- no returns description in source --></p></td>
      </tr>
    </table>

</div>

<div data-version-added="29">
    <h3 class="api-name" id="setMmsProxyAddress(java.lang.String)" data-text="setMmsProxyAddress">setMmsProxyAddress</h3>
    <div class="api-level">
      <div>
    Added in <a href="/guide/topics/manifest/uses-sdk-element#ApiLevels">API level 29</a>
  </div>
      
  

    </div>
<pre class="api-signature no-pretty-print" translate="no" dir="ltr">
public <a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a> setMmsProxyAddress (<a href="/reference/java/lang/String">String</a> mmsProxy)</pre>
    
    

    
  <p>Sets the MMS proxy address of the APN.</p></p>
    <table class="responsive">
    <tr><th colspan=2>Parameters</th></tr>
      <tr>
        <td><code translate="no" dir="ltr">mmsProxy</code></td>
        <td width="100%">
          <code translate="no" dir="ltr">String</code>: the MMS proxy address to set for the APN
 
 This value may be <code translate="no" dir="ltr">null</code>.</p></td>
      </tr>
    </table>
    <table class="responsive">
      <tr><th colspan=2>Returns</th></tr>
      <tr>
        <td><code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a></code></td>
        <td width="100%">This value cannot be <code translate="no" dir="ltr">null</code>.</p></td>
      </tr>
    </table>

</div>

<div data-version-added="28">
    <h3 class="api-name" id="setMmsProxyPort(int)" data-text="setMmsProxyPort">setMmsProxyPort</h3>
    <div class="api-level">
      <div>
    Added in <a href="/guide/topics/manifest/uses-sdk-element#ApiLevels">API level 28</a>
  </div>
      
  

    </div>
<pre class="api-signature no-pretty-print" translate="no" dir="ltr">
public <a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a> setMmsProxyPort (int mmsPort)</pre>
    
    

    
  <p>Sets the MMS proxy port of the APN.</p></p>
    <table class="responsive">
    <tr><th colspan=2>Parameters</th></tr>
      <tr>
        <td><code translate="no" dir="ltr">mmsPort</code></td>
        <td width="100%">
          <code translate="no" dir="ltr">int</code>: the MMS proxy port to set for the APN</p></td>
      </tr>
    </table>
    <table class="responsive">
      <tr><th colspan=2>Returns</th></tr>
      <tr>
        <td><code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a></code></td>
        <td width="100%">This value cannot be <code translate="no" dir="ltr">null</code>.</p></td>
      </tr>
    </table>

</div>

<div data-version-added="28">
    <h3 class="api-name" id="setMmsc(android.net.Uri)" data-text="setMmsc">setMmsc</h3>
    <div class="api-level">
      <div>
    Added in <a href="/guide/topics/manifest/uses-sdk-element#ApiLevels">API level 28</a>
  </div>
      
  

    </div>
<pre class="api-signature no-pretty-print" translate="no" dir="ltr">
public <a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a> setMmsc (<a href="/reference/android/net/Uri">Uri</a> mmsc)</pre>
    
    

    
  <p>Sets the MMSC Uri of the APN.</p></p>
    <table class="responsive">
    <tr><th colspan=2>Parameters</th></tr>
      <tr>
        <td><code translate="no" dir="ltr">mmsc</code></td>
        <td width="100%">
          <code translate="no" dir="ltr">Uri</code>: the MMSC Uri to set for the APN
 
 This value may be <code translate="no" dir="ltr">null</code>.</p></td>
      </tr>
    </table>
    <table class="responsive">
      <tr><th colspan=2>Returns</th></tr>
      <tr>
        <td><code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a></code></td>
        <td width="100%">This value cannot be <code translate="no" dir="ltr">null</code>.</p></td>
      </tr>
    </table>

</div>

<div data-version-added="33">
    <h3 class="api-name" id="setMtuV4(int)" data-text="setMtuV4">setMtuV4</h3>
    <div class="api-level">
      <div>
    Added in <a href="/guide/topics/manifest/uses-sdk-element#ApiLevels">API level 33</a>
  </div>
      
  

    </div>
<pre class="api-signature no-pretty-print" translate="no" dir="ltr">
public <a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a> setMtuV4 (int mtuV4)</pre>
    
    

    
  <p>Set the default MTU (Maximum Transmission Unit) size in bytes of the IPv4 routes brought
 up by this APN setting. Note this value will only be used when MTU size is not provided
 in <code translate="no" dir="ltr"><a href="/reference/android/telephony/data/DataCallResponse#getMtuV4()">DataCallResponse#getMtuV4()</a></code> during network bring up.</p></p>
    <table class="responsive">
    <tr><th colspan=2>Parameters</th></tr>
      <tr>
        <td><code translate="no" dir="ltr">mtuV4</code></td>
        <td width="100%">
          <code translate="no" dir="ltr">int</code>: the MTU size in bytes of the route.</p></td>
      </tr>
    </table>
    <table class="responsive">
      <tr><th colspan=2>Returns</th></tr>
      <tr>
        <td><code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a></code></td>
        <td width="100%">This value cannot be <code translate="no" dir="ltr">null</code>.</p></td>
      </tr>
    </table>

</div>

<div data-version-added="33">
    <h3 class="api-name" id="setMtuV6(int)" data-text="setMtuV6">setMtuV6</h3>
    <div class="api-level">
      <div>
    Added in <a href="/guide/topics/manifest/uses-sdk-element#ApiLevels">API level 33</a>
  </div>
      
  

    </div>
<pre class="api-signature no-pretty-print" translate="no" dir="ltr">
public <a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a> setMtuV6 (int mtuV6)</pre>
    
    

    
  <p>Set the default MTU (Maximum Transmission Unit) size in bytes of the IPv6 routes brought
 up by this APN setting. Note this value will only be used when MTU size is not provided
 in <code translate="no" dir="ltr"><a href="/reference/android/telephony/data/DataCallResponse#getMtuV6()">DataCallResponse#getMtuV6()</a></code> during network bring up.</p></p>
    <table class="responsive">
    <tr><th colspan=2>Parameters</th></tr>
      <tr>
        <td><code translate="no" dir="ltr">mtuV6</code></td>
        <td width="100%">
          <code translate="no" dir="ltr">int</code>: the MTU size in bytes of the route.</p></td>
      </tr>
    </table>
    <table class="responsive">
      <tr><th colspan=2>Returns</th></tr>
      <tr>
        <td><code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a></code></td>
        <td width="100%">This value cannot be <code translate="no" dir="ltr">null</code>.</p></td>
      </tr>
    </table>

</div>

<div data-version-added="28">
    <h3 class="api-name" id="setMvnoType(int)" data-text="setMvnoType">setMvnoType</h3>
    <div class="api-level">
      <div>
    Added in <a href="/guide/topics/manifest/uses-sdk-element#ApiLevels">API level 28</a>
  </div>
      
  

    </div>
<pre class="api-signature no-pretty-print" translate="no" dir="ltr">
public <a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a> setMvnoType (int mvnoType)</pre>
    
    

    
  <p>Sets the MVNO match type for this APN.</p></p>
    <table class="responsive">
    <tr><th colspan=2>Parameters</th></tr>
      <tr>
        <td><code translate="no" dir="ltr">mvnoType</code></td>
        <td width="100%">
          <code translate="no" dir="ltr">int</code>: the MVNO match type to set for this APN
 
 Value is <code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting#MVNO_TYPE_SPN">ApnSetting.MVNO_TYPE_SPN</a></code>, <code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting#MVNO_TYPE_IMSI">ApnSetting.MVNO_TYPE_IMSI</a></code>, <code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting#MVNO_TYPE_GID">ApnSetting.MVNO_TYPE_GID</a></code>, or <code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting#MVNO_TYPE_ICCID">ApnSetting.MVNO_TYPE_ICCID</a></code></p></td>
      </tr>
    </table>
    <table class="responsive">
      <tr><th colspan=2>Returns</th></tr>
      <tr>
        <td><code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a></code></td>
        <td width="100%">This value cannot be <code translate="no" dir="ltr">null</code>.</p></td>
      </tr>
    </table>

</div>

<div data-version-added="28">
    <h3 class="api-name" id="setNetworkTypeBitmask(int)" data-text="setNetworkTypeBitmask">setNetworkTypeBitmask</h3>
    <div class="api-level">
      <div>
    Added in <a href="/guide/topics/manifest/uses-sdk-element#ApiLevels">API level 28</a>
  </div>
      
  

    </div>
<pre class="api-signature no-pretty-print" translate="no" dir="ltr">
public <a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a> setNetworkTypeBitmask (int networkTypeBitmask)</pre>
    
    

    
  <p>Sets Radio Technology (Network Type) info for this APN.</p></p>
    <table class="responsive">
    <tr><th colspan=2>Parameters</th></tr>
      <tr>
        <td><code translate="no" dir="ltr">networkTypeBitmask</code></td>
        <td width="100%">
          <code translate="no" dir="ltr">int</code>: the Radio Technology (Network Type) info</p></td>
      </tr>
    </table>
    <table class="responsive">
      <tr><th colspan=2>Returns</th></tr>
      <tr>
        <td><code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a></code></td>
        <td width="100%">This value cannot be <code translate="no" dir="ltr">null</code>.</p></td>
      </tr>
    </table>

</div>

<div data-version-added="28">
    <h3 class="api-name" id="setOperatorNumeric(java.lang.String)" data-text="setOperatorNumeric">setOperatorNumeric</h3>
    <div class="api-level">
      <div>
    Added in <a href="/guide/topics/manifest/uses-sdk-element#ApiLevels">API level 28</a>
  </div>
      
  

    </div>
<pre class="api-signature no-pretty-print" translate="no" dir="ltr">
public <a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a> setOperatorNumeric (<a href="/reference/java/lang/String">String</a> operatorNumeric)</pre>
    
    

    
  <p>Sets the numeric operator ID for the APN. Numeric operator ID is defined as
 <code translate="no" dir="ltr"><a href="/reference/android/provider/Telephony.Carriers#MCC">Telephony.Carriers.MCC</a></code> +
 <code translate="no" dir="ltr"><a href="/reference/android/provider/Telephony.Carriers#MNC">Telephony.Carriers.MNC</a></code>.</p></p>
    <table class="responsive">
    <tr><th colspan=2>Parameters</th></tr>
      <tr>
        <td><code translate="no" dir="ltr">operatorNumeric</code></td>
        <td width="100%">
          <code translate="no" dir="ltr">String</code>: the numeric operator ID to set for this entry
 
 This value may be <code translate="no" dir="ltr">null</code>.</p></td>
      </tr>
    </table>
    <table class="responsive">
      <tr><th colspan=2>Returns</th></tr>
      <tr>
        <td><code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a></code></td>
        <td width="100%">This value cannot be <code translate="no" dir="ltr">null</code>.</p></td>
      </tr>
    </table>

</div>

<div data-version-added="28">
    <h3 class="api-name" id="setPassword(java.lang.String)" data-text="setPassword">setPassword</h3>
    <div class="api-level">
      <div>
    Added in <a href="/guide/topics/manifest/uses-sdk-element#ApiLevels">API level 28</a>
  </div>
      
  

    </div>
<pre class="api-signature no-pretty-print" translate="no" dir="ltr">
public <a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a> setPassword (<a href="/reference/java/lang/String">String</a> password)</pre>
    
    

    
  <p>Sets the APN password of the APN.</p></p>
    <table class="responsive">
    <tr><th colspan=2>Parameters</th></tr>
      <tr>
        <td><code translate="no" dir="ltr">password</code></td>
        <td width="100%">
          <code translate="no" dir="ltr">String</code>: the APN password to set for the APN
 
 This value may be <code translate="no" dir="ltr">null</code>.</p></td>
      </tr>
    </table>
    <table class="responsive">
      <tr><th colspan=2>Returns</th></tr>
      <tr>
        <td><code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a></code></td>
        <td width="100%">This value cannot be <code translate="no" dir="ltr">null</code>.</p></td>
      </tr>
    </table>
  <div>
      <p><b>See also:</b></p>
      <ul class="nolist"><li><code translate="no" dir="ltr"><a href="/reference/android/provider/Telephony.Carriers#PASSWORD">Telephony.Carriers.PASSWORD</a></code></li>
      </ul>
  </div>

</div>

<div data-version-added="33">
    <h3 class="api-name" id="setPersistent(boolean)" data-text="setPersistent">setPersistent</h3>
    <div class="api-level">
      <div>
    Added in <a href="/guide/topics/manifest/uses-sdk-element#ApiLevels">API level 33</a>
  </div>
      
  

    </div>
<pre class="api-signature no-pretty-print" translate="no" dir="ltr">
public <a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a> setPersistent (boolean isPersistent)</pre>
    
    

    
  <p>Set if the APN setting should be persistent/non-persistent in modem.</p></p>
    <table class="responsive">
    <tr><th colspan=2>Parameters</th></tr>
      <tr>
        <td><code translate="no" dir="ltr">isPersistent</code></td>
        <td width="100%">
          <code translate="no" dir="ltr">boolean</code>: <code translate="no" dir="ltr">true</code> if this APN setting should be persistent/non-persistent
 in modem.</p></td>
      </tr>
    </table>
    <table class="responsive">
      <tr><th colspan=2>Returns</th></tr>
      <tr>
        <td><code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a></code></td>
        <td width="100%">The same instance of the builder.
 
 This value cannot be <code translate="no" dir="ltr">null</code>.</p></td>
      </tr>
    </table>

</div>

<div data-version-added="33">
    <h3 class="api-name" id="setProfileId(int)" data-text="setProfileId">setProfileId</h3>
    <div class="api-level">
      <div>
    Added in <a href="/guide/topics/manifest/uses-sdk-element#ApiLevels">API level 33</a>
  </div>
      
  

    </div>
<pre class="api-signature no-pretty-print" translate="no" dir="ltr">
public <a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a> setProfileId (int profileId)</pre>
    
    

    
  <p>Sets the profile id to which the APN saved in modem.</p></p>
    <table class="responsive">
    <tr><th colspan=2>Parameters</th></tr>
      <tr>
        <td><code translate="no" dir="ltr">profileId</code></td>
        <td width="100%">
          <code translate="no" dir="ltr">int</code>: the profile id to set for the APN.</p></td>
      </tr>
    </table>
    <table class="responsive">
      <tr><th colspan=2>Returns</th></tr>
      <tr>
        <td><code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a></code></td>
        <td width="100%">This value cannot be <code translate="no" dir="ltr">null</code>.</p></td>
      </tr>
    </table>

</div>

<div data-version-added="28">
    <h3 class="api-name" id="setProtocol(int)" data-text="setProtocol">setProtocol</h3>
    <div class="api-level">
      <div>
    Added in <a href="/guide/topics/manifest/uses-sdk-element#ApiLevels">API level 28</a>
  </div>
      
  

    </div>
<pre class="api-signature no-pretty-print" translate="no" dir="ltr">
public <a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a> setProtocol (int protocol)</pre>
    
    

    
  <p>Sets the protocol to use to connect to this APN.

 <p>Protocol is one of the <code translate="no" dir="ltr">PDP_type</code> values in TS 27.007 section 10.1.1.</p></p>
    <table class="responsive">
    <tr><th colspan=2>Parameters</th></tr>
      <tr>
        <td><code translate="no" dir="ltr">protocol</code></td>
        <td width="100%">
          <code translate="no" dir="ltr">int</code>: the protocol to set to use to connect to this APN
 
 Value is <code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting#PROTOCOL_IP">ApnSetting.PROTOCOL_IP</a></code>, <code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting#PROTOCOL_IPV6">ApnSetting.PROTOCOL_IPV6</a></code>, <code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting#PROTOCOL_IPV4V6">ApnSetting.PROTOCOL_IPV4V6</a></code>, <code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting#PROTOCOL_PPP">ApnSetting.PROTOCOL_PPP</a></code>, <code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting#PROTOCOL_NON_IP">ApnSetting.PROTOCOL_NON_IP</a></code>, or <code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting#PROTOCOL_UNSTRUCTURED">ApnSetting.PROTOCOL_UNSTRUCTURED</a></code></p></td>
      </tr>
    </table>
    <table class="responsive">
      <tr><th colspan=2>Returns</th></tr>
      <tr>
        <td><code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a></code></td>
        <td width="100%">This value cannot be <code translate="no" dir="ltr">null</code>.</p></td>
      </tr>
    </table>

</div>

<div data-version-added="28" data-version-deprecated="29">
    <h3 class="api-name" id="setProxyAddress(java.net.InetAddress)" data-text="setProxyAddress">setProxyAddress</h3>
    <div class="api-level">
      <div>
    Added in <a href="/guide/topics/manifest/uses-sdk-element#ApiLevels">API level 28</a>
  <br>Deprecated in
    <a href="/guide/topics/manifest/uses-sdk-element#ApiLevels">API level
      29</a>
  </div>
      
  

    </div>
<pre class="api-signature no-pretty-print" translate="no" dir="ltr">
public <a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a> setProxyAddress (<a href="/reference/java/net/InetAddress">InetAddress</a> proxy)</pre>
    
    

    <p>
  <p class="caution"><strong>
      This method was deprecated
      in API level 29.</strong><br/>
    use <code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting.Builder#setProxyAddress(java.lang.String)">setProxyAddress(java.lang.String)</a></code> instead.
  </p>
  <p>Sets the address of an HTTP proxy for the APN. The proxy address can be an IP address or
 hostname. If <code translate="no" dir="ltr">proxy</code> contains both an IP address and hostname, this method ignores
 the IP address.

 <p>The <code translate="no" dir="ltr"><a href="/reference/java/net/InetAddress">InetAddress</a></code> methods
 <code translate="no" dir="ltr"><a href="/reference/java/net/InetAddress#getAllByName(java.lang.String)">getAllByName()</a></code> require DNS for hostname
 resolution. To avoid this requirement when setting a hostname, call
 <code translate="no" dir="ltr"><a href="/reference/java/net/InetAddress#getByAddress(java.lang.String,%20byte[])">InetAddress.getByAddress(java.lang.String, byte[])</a></code> with both the
 hostname and a placeholder IP address. See <code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting.Builder">above</a></code> for an
 example.</p></p>
    <table class="responsive">
    <tr><th colspan=2>Parameters</th></tr>
      <tr>
        <td><code translate="no" dir="ltr">proxy</code></td>
        <td width="100%">
          <code translate="no" dir="ltr">InetAddress</code>: the proxy address to set for the APN</p></td>
      </tr>
    </table>
    <table class="responsive">
      <tr><th colspan=2>Returns</th></tr>
      <tr>
        <td><code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a></code></td>
        <td width="100%"><!-- no returns description in source --></p></td>
      </tr>
    </table>

</div>

<div data-version-added="29">
    <h3 class="api-name" id="setProxyAddress(java.lang.String)" data-text="setProxyAddress">setProxyAddress</h3>
    <div class="api-level">
      <div>
    Added in <a href="/guide/topics/manifest/uses-sdk-element#ApiLevels">API level 29</a>
  </div>
      
  

    </div>
<pre class="api-signature no-pretty-print" translate="no" dir="ltr">
public <a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a> setProxyAddress (<a href="/reference/java/lang/String">String</a> proxy)</pre>
    
    

    
  <p>Sets the proxy address of the APN.</p></p>
    <table class="responsive">
    <tr><th colspan=2>Parameters</th></tr>
      <tr>
        <td><code translate="no" dir="ltr">proxy</code></td>
        <td width="100%">
          <code translate="no" dir="ltr">String</code>: the proxy address to set for the APN
 
 This value may be <code translate="no" dir="ltr">null</code>.</p></td>
      </tr>
    </table>
    <table class="responsive">
      <tr><th colspan=2>Returns</th></tr>
      <tr>
        <td><code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a></code></td>
        <td width="100%">This value cannot be <code translate="no" dir="ltr">null</code>.</p></td>
      </tr>
    </table>

</div>

<div data-version-added="28">
    <h3 class="api-name" id="setProxyPort(int)" data-text="setProxyPort">setProxyPort</h3>
    <div class="api-level">
      <div>
    Added in <a href="/guide/topics/manifest/uses-sdk-element#ApiLevels">API level 28</a>
  </div>
      
  

    </div>
<pre class="api-signature no-pretty-print" translate="no" dir="ltr">
public <a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a> setProxyPort (int port)</pre>
    
    

    
  <p>Sets the proxy port of the APN.</p></p>
    <table class="responsive">
    <tr><th colspan=2>Parameters</th></tr>
      <tr>
        <td><code translate="no" dir="ltr">port</code></td>
        <td width="100%">
          <code translate="no" dir="ltr">int</code>: the proxy port to set for the APN</p></td>
      </tr>
    </table>
    <table class="responsive">
      <tr><th colspan=2>Returns</th></tr>
      <tr>
        <td><code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a></code></td>
        <td width="100%">This value cannot be <code translate="no" dir="ltr">null</code>.</p></td>
      </tr>
    </table>

</div>

<div data-version-added="28">
    <h3 class="api-name" id="setRoamingProtocol(int)" data-text="setRoamingProtocol">setRoamingProtocol</h3>
    <div class="api-level">
      <div>
    Added in <a href="/guide/topics/manifest/uses-sdk-element#ApiLevels">API level 28</a>
  </div>
      
  

    </div>
<pre class="api-signature no-pretty-print" translate="no" dir="ltr">
public <a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a> setRoamingProtocol (int roamingProtocol)</pre>
    
    

    
  <p>Sets the protocol to use to connect to this APN when the device is roaming.

 <p>Roaming protocol is one of the <code translate="no" dir="ltr">PDP_type</code> values in TS 27.007 section 10.1.1.</p></p>
    <table class="responsive">
    <tr><th colspan=2>Parameters</th></tr>
      <tr>
        <td><code translate="no" dir="ltr">roamingProtocol</code></td>
        <td width="100%">
          <code translate="no" dir="ltr">int</code>: the protocol to set to use to connect to this APN when roaming
 
 Value is <code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting#PROTOCOL_IP">ApnSetting.PROTOCOL_IP</a></code>, <code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting#PROTOCOL_IPV6">ApnSetting.PROTOCOL_IPV6</a></code>, <code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting#PROTOCOL_IPV4V6">ApnSetting.PROTOCOL_IPV4V6</a></code>, <code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting#PROTOCOL_PPP">ApnSetting.PROTOCOL_PPP</a></code>, <code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting#PROTOCOL_NON_IP">ApnSetting.PROTOCOL_NON_IP</a></code>, or <code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting#PROTOCOL_UNSTRUCTURED">ApnSetting.PROTOCOL_UNSTRUCTURED</a></code></p></td>
      </tr>
    </table>
    <table class="responsive">
      <tr><th colspan=2>Returns</th></tr>
      <tr>
        <td><code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a></code></td>
        <td width="100%">This value cannot be <code translate="no" dir="ltr">null</code>.</p></td>
      </tr>
    </table>

</div>

<div data-version-added="28">
    <h3 class="api-name" id="setUser(java.lang.String)" data-text="setUser">setUser</h3>
    <div class="api-level">
      <div>
    Added in <a href="/guide/topics/manifest/uses-sdk-element#ApiLevels">API level 28</a>
  </div>
      
  

    </div>
<pre class="api-signature no-pretty-print" translate="no" dir="ltr">
public <a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a> setUser (<a href="/reference/java/lang/String">String</a> user)</pre>
    
    

    
  <p>Sets the APN username of the APN.</p></p>
    <table class="responsive">
    <tr><th colspan=2>Parameters</th></tr>
      <tr>
        <td><code translate="no" dir="ltr">user</code></td>
        <td width="100%">
          <code translate="no" dir="ltr">String</code>: the APN username to set for the APN
 
 This value may be <code translate="no" dir="ltr">null</code>.</p></td>
      </tr>
    </table>
    <table class="responsive">
      <tr><th colspan=2>Returns</th></tr>
      <tr>
        <td><code translate="no" dir="ltr"><a href="/reference/android/telephony/data/ApnSetting.Builder">ApnSetting.Builder</a></code></td>
        <td width="100%">This value cannot be <code translate="no" dir="ltr">null</code>.</p></td>
      </tr>
    </table>

</div>





<!-- ========= METHOD DETAIL ======== -->



<!-- ========= END OF CLASS DATA ========= -->

</div><!-- end jd-content -->


</div><!-- end devsite ReferenceObject -->

  

  
    <devsite-hats-survey class="nocontent"
      hats-id="onAFgYxTD0kxBYCLVTd0Z41p75CM"
      listnr-id="5207477"></devsite-hats-survey>
  
</div>

  

  
    
      <devsite-recommendations display="in-page" hidden yield>
      </devsite-recommendations>
    
    
      
    <devsite-thumb-rating position="footer">
    </devsite-thumb-rating>
  
       
    
    
      <devsite-recommendations id="recommendations-link" yield></devsite-recommendations>
    
  

  
  
</article>


<devsite-content-footer class="nocontent">
  <p>Content and code samples on this page are subject to the licenses described in the <a href="/license">Content License</a>. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.</p>
  <p>Last updated 2023-02-08 UTC.</p>
</devsite-content-footer>


<devsite-notification
>
</devsite-notification>


  
<div class="devsite-content-data">
  <template class="devsite-thumb-rating-down-categories">
  [{
      "type": "thumb-down",
      "id": "missingTheInformationINeed",
      "label":"Missing the information I need"
    },{
      "type": "thumb-down",
      "id": "tooComplicatedTooManySteps",
      "label":"Too complicated / too many steps"
    },{
      "type": "thumb-down",
      "id": "outOfDate",
      "label":"Out of date"
    },{
      "type": "thumb-down",
      "id": "samplesCodeIssue",
      "label":"Samples / code issue"
    },{
      "type": "thumb-down",
      "id": "otherDown",
      "label":"Other"
    }]
  </template>
  <template class="devsite-thumb-rating-up-categories">
  [{
      "type": "thumb-up",
      "id": "easyToUnderstand",
      "label":"Easy to understand"
    },{
      "type": "thumb-up",
      "id": "solvedMyProblem",
      "label":"Solved my problem"
    },{
      "type": "thumb-up",
      "id": "otherUp",
      "label":"Other"
    }]
  </template>
  
</div>
            
          </devsite-content>
        </main>
        <devsite-footer-promos class="devsite-footer">
          
            

<nav class="devsite-footer-promos nocontent" aria-label="Promotions">
  <ul class="devsite-footer-promos-list">
    
    <li class="devsite-footer-promo">
      <a href="//x.com/AndroidDev"
         class="devsite-footer-promo-title gc-analytics-event"
         data-category="Site-Wide Custom Events"
       
       
         data-label="Footer X Promo"
       >
        
        
          
            <img class="devsite-footer-promo-icon"
                 src="/_static/android/images/logo-x.svg"
                 loading="lazy"
                 alt="X">
          
        
        X
      </a>
      <div class="devsite-footer-promo-description">Follow @AndroidDev on X</div>
    </li>
    
    <li class="devsite-footer-promo">
      <a href="//www.youtube.com/user/androiddevelopers"
         class="devsite-footer-promo-title gc-analytics-event"
         data-category="Site-Wide Custom Events"
       
       
         data-label="Footer YouTube Promo"
       >
        
        
          
            <img class="devsite-footer-promo-icon"
                 src="//www.gstatic.com/images/icons/material/product/2x/youtube_48dp.png"
                 loading="lazy"
                 alt="YouTube">
          
        
        YouTube
      </a>
      <div class="devsite-footer-promo-description">Check out Android Developers on YouTube</div>
    </li>
    
    <li class="devsite-footer-promo">
      <a href="//www.linkedin.com/showcase/androiddev"
         class="devsite-footer-promo-title gc-analytics-event"
         data-category="Site-Wide Custom Events"
       
       
         data-label="Footer LinkedIn Promo"
       >
        
        
          
            <img class="devsite-footer-promo-icon"
                 src="/_static/android/images/logo-linkedin.svg"
                 loading="lazy"
                 alt="LinkedIn">
          
        
        LinkedIn
      </a>
      <div class="devsite-footer-promo-description">Connect with the Android Developers community on LinkedIn</div>
    </li>
    
  </ul>
</nav>

          
        </devsite-footer-promos>
        <devsite-footer-linkboxes class="devsite-footer">
          
            
<nav class="devsite-footer-linkboxes nocontent" aria-label="Footer links">
  
  <ul class="devsite-footer-linkboxes-list">
    
    <li class="devsite-footer-linkbox ">
    <h3 class="devsite-footer-linkbox-heading no-link">More Android</h3>
      <ul class="devsite-footer-linkbox-list">
        
        <li class="devsite-footer-linkbox-item">
          
          <a href="//www.android.com"
             class="devsite-footer-linkbox-link gc-analytics-event"
             data-category="Site-Wide Custom Events"
            
             data-label="Footer Link (index 1)"
            >
            
          
            Android
          
          </a>
          
          
        </li>
        
        <li class="devsite-footer-linkbox-item">
          
          <a href="//www.android.com/enterprise/"
             class="devsite-footer-linkbox-link gc-analytics-event"
             data-category="Site-Wide Custom Events"
            
             data-label="Footer Link (index 2)"
            >
            
          
            Android for Enterprise
          
          </a>
          
          
        </li>
        
        <li class="devsite-footer-linkbox-item">
          
          <a href="//www.android.com/security-center/"
             class="devsite-footer-linkbox-link gc-analytics-event"
             data-category="Site-Wide Custom Events"
            
             data-label="Footer Link (index 3)"
            >
            
          
            Security
          
          </a>
          
          
        </li>
        
        <li class="devsite-footer-linkbox-item">
          
          <a href="//source.android.com"
             class="devsite-footer-linkbox-link gc-analytics-event"
             data-category="Site-Wide Custom Events"
            
             data-label="Footer Link (index 4)"
            >
            
          
            Source
          
          </a>
          
          
        </li>
        
        <li class="devsite-footer-linkbox-item">
          
          <a href="/news"
             class="devsite-footer-linkbox-link gc-analytics-event"
             data-category="Site-Wide Custom Events"
            
             data-label="Footer Link (index 5)"
            >
            
          
            News
          
          </a>
          
          
        </li>
        
        <li class="devsite-footer-linkbox-item">
          
          <a href="//android-developers.googleblog.com/"
             class="devsite-footer-linkbox-link gc-analytics-event"
             data-category="Site-Wide Custom Events"
            
             data-label="Footer Link (index 6)"
            >
            
          
            Blog
          
          </a>
          
          
        </li>
        
        <li class="devsite-footer-linkbox-item">
          
          <a href="/podcasts"
             class="devsite-footer-linkbox-link gc-analytics-event"
             data-category="Site-Wide Custom Events"
            
             data-label="Footer Link (index 7)"
            >
            
              
              
            
          
            Podcasts
          
          </a>
          
          
        </li>
        
      </ul>
    </li>
    
    <li class="devsite-footer-linkbox ">
    <h3 class="devsite-footer-linkbox-heading no-link">Discover</h3>
      <ul class="devsite-footer-linkbox-list">
        
        <li class="devsite-footer-linkbox-item">
          
          <a href="/games"
             class="devsite-footer-linkbox-link gc-analytics-event"
             data-category="Site-Wide Custom Events"
            
             data-label="Footer Link (index 1)"
            >
            
          
            Gaming
          
          </a>
          
          
        </li>
        
        <li class="devsite-footer-linkbox-item">
          
          <a href="/ml"
             class="devsite-footer-linkbox-link gc-analytics-event"
             data-category="Site-Wide Custom Events"
            
             data-label="Footer Link (index 2)"
            >
            
          
            Machine Learning
          
          </a>
          
          
        </li>
        
        <li class="devsite-footer-linkbox-item">
          
          <a href="/privacy"
             class="devsite-footer-linkbox-link gc-analytics-event"
             data-category="Site-Wide Custom Events"
            
             data-label="Footer Link (index 3)"
            >
            
          
            Privacy
          
          </a>
          
          
        </li>
        
        <li class="devsite-footer-linkbox-item">
          
          <a href="/training/connectivity/5g"
             class="devsite-footer-linkbox-link gc-analytics-event"
             data-category="Site-Wide Custom Events"
            
             data-label="Footer Link (index 4)"
            >
            
              
              
            
          
            5G
          
          </a>
          
          
        </li>
        
      </ul>
    </li>
    
    <li class="devsite-footer-linkbox ">
    <h3 class="devsite-footer-linkbox-heading no-link">Android Devices</h3>
      <ul class="devsite-footer-linkbox-list">
        
        <li class="devsite-footer-linkbox-item">
          
          <a href="/large-screens"
             class="devsite-footer-linkbox-link gc-analytics-event"
             data-category="Site-Wide Custom Events"
            
             data-label="Footer Link (index 1)"
            >
            
          
            Large screens
          
          </a>
          
          
        </li>
        
        <li class="devsite-footer-linkbox-item">
          
          <a href="/wear"
             class="devsite-footer-linkbox-link gc-analytics-event"
             data-category="Site-Wide Custom Events"
            
             data-label="Footer Link (index 2)"
            >
            
          
            Wear OS
          
          </a>
          
          
        </li>
        
        <li class="devsite-footer-linkbox-item">
          
          <a href="/chrome-os"
             class="devsite-footer-linkbox-link gc-analytics-event"
             data-category="Site-Wide Custom Events"
            
             data-label="Footer Link (index 3)"
            >
            
          
            ChromeOS devices
          
          </a>
          
          
        </li>
        
        <li class="devsite-footer-linkbox-item">
          
          <a href="/cars"
             class="devsite-footer-linkbox-link gc-analytics-event"
             data-category="Site-Wide Custom Events"
            
             data-label="Footer Link (index 4)"
            >
            
          
            Android for cars
          
          </a>
          
          
        </li>
        
        <li class="devsite-footer-linkbox-item">
          
          <a href="/things"
             class="devsite-footer-linkbox-link gc-analytics-event"
             data-category="Site-Wide Custom Events"
            
             data-label="Footer Link (index 5)"
            >
            
          
            Android Things
          
          </a>
          
          
        </li>
        
        <li class="devsite-footer-linkbox-item">
          
          <a href="/tv"
             class="devsite-footer-linkbox-link gc-analytics-event"
             data-category="Site-Wide Custom Events"
            
             data-label="Footer Link (index 6)"
            >
            
              
              
            
          
            Android TV
          
          </a>
          
          
        </li>
        
      </ul>
    </li>
    
    <li class="devsite-footer-linkbox ">
    <h3 class="devsite-footer-linkbox-heading no-link">Releases</h3>
      <ul class="devsite-footer-linkbox-list">
        
        <li class="devsite-footer-linkbox-item">
          
          <a href="/about/versions/13"
             class="devsite-footer-linkbox-link gc-analytics-event"
             data-category="Site-Wide Custom Events"
            
             data-label="Footer Link (index 1)"
            >
            
          
            Android 13
          
          </a>
          
          
        </li>
        
        <li class="devsite-footer-linkbox-item">
          
          <a href="/about/versions/12"
             class="devsite-footer-linkbox-link gc-analytics-event"
             data-category="Site-Wide Custom Events"
            
             data-label="Footer Link (index 2)"
            >
            
          
            Android 12
          
          </a>
          
          
        </li>
        
        <li class="devsite-footer-linkbox-item">
          
          <a href="/about/versions/11"
             class="devsite-footer-linkbox-link gc-analytics-event"
             data-category="Site-Wide Custom Events"
            
             data-label="Footer Link (index 3)"
            >
            
          
            Android 11
          
          </a>
          
          
        </li>
        
        <li class="devsite-footer-linkbox-item">
          
          <a href="/about/versions/10"
             class="devsite-footer-linkbox-link gc-analytics-event"
             data-category="Site-Wide Custom Events"
            
             data-label="Footer Link (index 4)"
            >
            
          
            Android 10
          
          </a>
          
          
        </li>
        
        <li class="devsite-footer-linkbox-item">
          
          <a href="/about/versions/pie"
             class="devsite-footer-linkbox-link gc-analytics-event"
             data-category="Site-Wide Custom Events"
            
             data-label="Footer Link (index 5)"
            >
            
          
            Pie
          
          </a>
          
          
        </li>
        
        <li class="devsite-footer-linkbox-item">
          
          <a href="/about/versions/oreo"
             class="devsite-footer-linkbox-link gc-analytics-event"
             data-category="Site-Wide Custom Events"
            
             data-label="Footer Link (index 6)"
            >
            
          
            Oreo
          
          </a>
          
          
        </li>
        
        <li class="devsite-footer-linkbox-item">
          
          <a href="/about/versions/nougat"
             class="devsite-footer-linkbox-link gc-analytics-event"
             data-category="Site-Wide Custom Events"
            
             data-label="Footer Link (index 7)"
            >
            
              
              
            
          
            Nougat
          
          </a>
          
          
        </li>
        
      </ul>
    </li>
    
    <li class="devsite-footer-linkbox ">
    <h3 class="devsite-footer-linkbox-heading no-link">Documentation and Downloads</h3>
      <ul class="devsite-footer-linkbox-list">
        
        <li class="devsite-footer-linkbox-item">
          
          <a href="/studio/intro"
             class="devsite-footer-linkbox-link gc-analytics-event"
             data-category="Site-Wide Custom Events"
            
             data-label="Footer Link (index 1)"
            >
            
          
            Android Studio guide
          
          </a>
          
          
        </li>
        
        <li class="devsite-footer-linkbox-item">
          
          <a href="/guide"
             class="devsite-footer-linkbox-link gc-analytics-event"
             data-category="Site-Wide Custom Events"
            
             data-label="Footer Link (index 2)"
            >
            
          
            Developers guides
          
          </a>
          
          
        </li>
        
        <li class="devsite-footer-linkbox-item">
          
          <a href="/reference"
             class="devsite-footer-linkbox-link gc-analytics-event"
             data-category="Site-Wide Custom Events"
            
             data-label="Footer Link (index 3)"
            >
            
          
            API reference
          
          </a>
          
          
        </li>
        
        <li class="devsite-footer-linkbox-item">
          
          <a href="/studio"
             class="devsite-footer-linkbox-link gc-analytics-event"
             data-category="Site-Wide Custom Events"
            
             data-label="Footer Link (index 4)"
            >
            
          
            Download Studio
          
          </a>
          
          
        </li>
        
        <li class="devsite-footer-linkbox-item">
          
          <a href="/ndk"
             class="devsite-footer-linkbox-link gc-analytics-event"
             data-category="Site-Wide Custom Events"
            
             data-label="Footer Link (index 5)"
            >
            
              
              
            
          
            Android NDK
          
          </a>
          
          
        </li>
        
      </ul>
    </li>
    
    <li class="devsite-footer-linkbox ">
    <h3 class="devsite-footer-linkbox-heading no-link">Support</h3>
      <ul class="devsite-footer-linkbox-list">
        
        <li class="devsite-footer-linkbox-item">
          
          <a href="//issuetracker.google.com/issues/new?component=190923&amp;template=841312"
             class="devsite-footer-linkbox-link gc-analytics-event"
             data-category="Site-Wide Custom Events"
            
             data-label="Footer Link (index 1)"
            >
            
          
            Report platform bug
          
          </a>
          
          
        </li>
        
        <li class="devsite-footer-linkbox-item">
          
          <a href="//issuetracker.google.com/issues/new?component=192697"
             class="devsite-footer-linkbox-link gc-analytics-event"
             data-category="Site-Wide Custom Events"
            
             data-label="Footer Link (index 2)"
            >
            
          
            Report documentation bug
          
          </a>
          
          
        </li>
        
        <li class="devsite-footer-linkbox-item">
          
          <a href="//support.google.com/googleplay/android-developer"
             class="devsite-footer-linkbox-link gc-analytics-event"
             data-category="Site-Wide Custom Events"
            
             data-label="Footer Link (index 3)"
            >
            
          
            Google Play support
          
          </a>
          
          
        </li>
        
        <li class="devsite-footer-linkbox-item">
          
          <a href="https://g.co/userresearch/androiddeveloperfooter"
             class="devsite-footer-linkbox-link gc-analytics-event"
             data-category="Site-Wide Custom Events"
            
             data-label="Footer Link (index 4)"
            >
            
              
              
            
          
            Join research studies
          
          </a>
          
          
        </li>
        
      </ul>
    </li>
    
  </ul>
  
</nav>
          
        </devsite-footer-linkboxes>
        <devsite-footer-utility class="devsite-footer">
          
            

<div class="devsite-footer-utility nocontent">
  
  
  <nav class="devsite-footer-sites" aria-label="Other Google Developers websites">
    <a href="https://developers.google.com/"
       class="devsite-footer-sites-logo-link gc-analytics-event"
       data-category="Site-Wide Custom Events"
       data-label="Footer Google Developers Link">
      <picture>
        <source srcset="https://www.gstatic.com/devrel-devsite/prod/va65162e8ce9aacc75e4d3c0cd6d166fc6ceaaf184fea0ff0eac1d9b62c0480be/android/images/lockup-google-for-developers-dark-theme.svg"
                media="(prefers-color-scheme: none)"
                class="devsite-dark-theme"
                loading="lazy"
                alt="Google Developers">
        <img class="devsite-footer-sites-logo"
             src="https://www.gstatic.com/devrel-devsite/prod/va65162e8ce9aacc75e4d3c0cd6d166fc6ceaaf184fea0ff0eac1d9b62c0480be/android/images/lockup-google-for-developers.svg"
             loading="lazy"
             alt="Google Developers">
      </picture>
    </a>
    <ul class="devsite-footer-sites-list">
      
      <li class="devsite-footer-sites-item">
        <a href="//developer.android.com"
           class="devsite-footer-sites-link
                  gc-analytics-event"
           data-category="Site-Wide Custom Events"
         
           data-label="Footer Android Link"
         
         >
          Android
        </a>
      </li>
      
      <li class="devsite-footer-sites-item">
        <a href="//developer.chrome.com/home"
           class="devsite-footer-sites-link
                  gc-analytics-event"
           data-category="Site-Wide Custom Events"
         
           data-label="Footer Chrome Link"
         
         >
          Chrome
        </a>
      </li>
      
      <li class="devsite-footer-sites-item">
        <a href="//firebase.google.com"
           class="devsite-footer-sites-link
                  gc-analytics-event"
           data-category="Site-Wide Custom Events"
         
           data-label="Footer Firebase Link"
         
         >
          Firebase
        </a>
      </li>
      
      <li class="devsite-footer-sites-item">
        <a href="//cloud.google.com"
           class="devsite-footer-sites-link
                  gc-analytics-event"
           data-category="Site-Wide Custom Events"
         
           data-label="Footer Google Cloud Platform Link"
         
         >
          Google Cloud Platform
        </a>
      </li>
      
      <li class="devsite-footer-sites-item">
        <a href="//developers.google.com/products/"
           class="devsite-footer-sites-link
                  gc-analytics-event"
           data-category="Site-Wide Custom Events"
         
           data-label="Footer All products Link"
         
         >
          All products
        </a>
      </li>
      
    </ul>
  </nav>
  

  
  <nav class="devsite-footer-utility-links" aria-label="Utility links">
    
    <ul class="devsite-footer-utility-list">
      
      <li class="devsite-footer-utility-item
                 ">
        
        
        <a class="devsite-footer-utility-link gc-analytics-event"
           href="//policies.google.com/privacy"
           data-category="Site-Wide Custom Events"
           data-label="Footer Privacy link"
         >
          Privacy
        </a>
        
      </li>
      
      <li class="devsite-footer-utility-item
                 ">
        
        
        <a class="devsite-footer-utility-link gc-analytics-event"
           href="/license"
           data-category="Site-Wide Custom Events"
           data-label="Footer License link"
         >
          License
        </a>
        
      </li>
      
      <li class="devsite-footer-utility-item
                 ">
        
        
        <a class="devsite-footer-utility-link gc-analytics-event"
           href="/distribute/marketing-tools/brand-guidelines"
           data-category="Site-Wide Custom Events"
           data-label="Footer Brand guidelines link"
         >
          Brand guidelines
        </a>
        
      </li>
      
      <li class="devsite-footer-utility-item
                 devsite-footer-utility-button">
        
        <span class="devsite-footer-utility-description">Get news and tips by email</span>
        
        
        <a class="devsite-footer-utility-link gc-analytics-event"
           href="/updates"
           data-category="Site-Wide Custom Events"
           data-label="Footer Subscribe link"
         >
          Subscribe
        </a>
        
      </li>
      
    </ul>
    
    
<devsite-language-selector>
  <ul role="presentation">
    
    
    <li role="presentation">
      <a role="menuitem" lang="en"
        >English</a>
    </li>
    
    <li role="presentation">
      <a role="menuitem" lang="es_419"
        >Español – América Latina</a>
    </li>
    
    <li role="presentation">
      <a role="menuitem" lang="id"
        >Indonesia</a>
    </li>
    
    <li role="presentation">
      <a role="menuitem" lang="pt_br"
        >Português – Brasil</a>
    </li>
    
    <li role="presentation">
      <a role="menuitem" lang="zh_cn"
        >中文 – 简体</a>
    </li>
    
    <li role="presentation">
      <a role="menuitem" lang="ja"
        >日本語</a>
    </li>
    
    <li role="presentation">
      <a role="menuitem" lang="ko"
        >한국어</a>
    </li>
    
  </ul>
</devsite-language-selector>

  </nav>
</div>
          
        </devsite-footer-utility>
        <devsite-panel></devsite-panel>
        
      </section></section>
    <devsite-sitemask></devsite-sitemask>
    <devsite-snackbar
    
    >
</devsite-snackbar>
    <devsite-tooltip ></devsite-tooltip>
    <devsite-heading-link></devsite-heading-link>
    <devsite-analytics analytics-iframe>
      
        <script type="application/json" analytics>[{&#34;dimensions&#34;: {&#34;dimension6&#34;: &#34;en&#34;, &#34;dimension11&#34;: false, &#34;dimension4&#34;: &#34;Android Developers&#34;, &#34;dimension3&#34;: false, &#34;dimension1&#34;: &#34;Signed out&#34;, &#34;dimension5&#34;: &#34;en&#34;}, &#34;gaid&#34;: &#34;UA-5831155-1&#34;, &#34;metrics&#34;: {&#34;ratings_value&#34;: &#34;metric1&#34;, &#34;ratings_count&#34;: &#34;metric2&#34;}}]</script>
<script type="application/json" tag-management>{&#34;ga4&#34;: [], &#34;ga4p&#34;: [], &#34;gtm&#34;: [&#34;GTM-KMSWPCJ&#34;], &#34;parameters&#34;: {&#34;internalUser&#34;: &#34;False&#34;, &#34;language&#34;: {&#34;machineTranslated&#34;: &#34;False&#34;, &#34;requested&#34;: &#34;en&#34;, &#34;served&#34;: &#34;en&#34;}, &#34;pageType&#34;: &#34;reference&#34;, &#34;projectName&#34;: &#34;Android Developers&#34;, &#34;signedIn&#34;: &#34;False&#34;, &#34;tenant&#34;: &#34;android&#34;, &#34;recommendations&#34;: {&#34;sourcePage&#34;: &#34;&#34;, &#34;sourceType&#34;: 0, &#34;sourceRank&#34;: 0, &#34;sourceIdenticalDescriptions&#34;: 0, &#34;sourceTitleWords&#34;: 0, &#34;sourceDescriptionWords&#34;: 0, &#34;experiment&#34;: &#34;&#34;}, &#34;experiment&#34;: {&#34;ids&#34;: &#34;&#34;}}, &#34;tags&#34;: [&#34;GTM-KMSWPCJ&#34;]}</script>
      
    </devsite-analytics>
    
      <devsite-badger></devsite-badger>
    
    
<android-fully-clickable
    target="
        .android-case-study .devsite-landing-row-item,
        .android-grouped-resources .devsite-landing-row-item,
        .android-illustrated-resources-index .devsite-landing-row-item,
        .android-illustrated-resources-primary .devsite-landing-row-item,
        .android-illustrated-resources-secondary .devsite-landing-row-item,
        .android-illustrated-resources-secondary-small .devsite-landing-row-item,
        .android-illustrated-resources-tertiary .devsite-landing-row-item,
        .android-illustrated-resources-tertiary-small .devsite-landing-row-item,
        .android-promo .devsite-landing-row-item,
        .android-quick-link,
        .android-samples .devsite-card-wrapper,
        .fully-clickable"
    watch=".android-samples, devsite-content"></android-fully-clickable>
    <script nonce="YRNNB8bKYR3fMvyWtohfSIJldnbKfM">
  
  (function(d,e,v,s,i,t,E){d['GoogleDevelopersObject']=i;
    t=e.createElement(v);t.async=1;t.src=s;E=e.getElementsByTagName(v)[0];
    E.parentNode.insertBefore(t,E);})(window, document, 'script',
    'https://www.gstatic.com/devrel-devsite/prod/va65162e8ce9aacc75e4d3c0cd6d166fc6ceaaf184fea0ff0eac1d9b62c0480be/android/js/app_loader.js', '[3,"en",null,"/js/devsite_app_module.js","https://www.gstatic.com/devrel-devsite/prod/va65162e8ce9aacc75e4d3c0cd6d166fc6ceaaf184fea0ff0eac1d9b62c0480be","https://www.gstatic.com/devrel-devsite/prod/va65162e8ce9aacc75e4d3c0cd6d166fc6ceaaf184fea0ff0eac1d9b62c0480be/android","https://android-dot-devsite-v2-prod.appspot.com",null,null,["/_pwa/android/manifest.json","https://www.gstatic.com/devrel-devsite/prod/va65162e8ce9aacc75e4d3c0cd6d166fc6ceaaf184fea0ff0eac1d9b62c0480be/images/video-placeholder.svg","https://www.gstatic.com/devrel-devsite/prod/va65162e8ce9aacc75e4d3c0cd6d166fc6ceaaf184fea0ff0eac1d9b62c0480be/android/images/rebrand/favicon.svg","https://www.gstatic.com/devrel-devsite/prod/va65162e8ce9aacc75e4d3c0cd6d166fc6ceaaf184fea0ff0eac1d9b62c0480be/android/images/rebrand/lockup.svg","https://fonts.googleapis.com/css?family=Google+Sans:400,500,600,700|Google+Sans+Text:400,400italic,500,500italic,600,600italic,700,700italic|Roboto+Mono:400,500,700&display=swap"],1,null,[1,6,8,12,14,17,21,25,40,50,52,63,70,75,76,80,87,91,92,93,97,98,100,101,102,103,104,105,107,108,109,110,111,112,113,115,117,118,120,122,124,125,126,127,129,130,131,132,133,134,135,136,138,140,141,144,147,148,149,150,151,152,154,155,156,157,158,159,161,163,164,165,168,169,170,172,173,179,180,182,183,186,190,191,193,196],"AIzaSyAP-jjEJBzmIyKR4F-3XITp8yM9T1gEEI8","AIzaSyB6xiKGDR5O3Ak2okS4rLkauxGUG7XP0hg","developer.android.com","AIzaSyAQk0fBONSGUqCNznf6Krs82Ap1-NV6J4o","AIzaSyCCxcqdrZ_7QMeLCRY20bh_SXdAYqy70KY",null,null,null,["Cloud__enable_cloud_dlp_service","ContentExcellence__enable_googler_button","Profiles__enable_page_saving","Profiles__enable_developer_profiles_interests","MiscFeatureFlags__enable_tls_version_for_gaia_calls","MiscFeatureFlags__content_publisher_push_queue","Search__enable_acl_suggestions","MiscFeatureFlags__enable_firebase_utm","Search__enable_suggestions_from_borg","Rebranding__enable_rebranding","Profiles__enable_profile_notifications_ui","Profiles__enable_searchable_interests","Experiments__enable_experiments","MiscFeatureFlags__enable_keyword_inheritance","Localization__enable_locale_redirects","MiscFeatureFlags__developers_footer_image","Badges__enable_hide_badges","AuthorPageInsights__enable_author_page_insights","Profiles__enable_developer_profiles_callout","Significatio__enable_by_tenant","BookNav__enable_tenant_cache_key","Concierge__enable_pushui","Cloud__enable_cloudx_ping","Profiles__enable_inferred_interests","Profiles__enable_profile_collections","BookNav__enable_collapsible_book_nav","Cloud__enable_cloud_facet_chat","OpenInReplit__enable_replit","BookNav__enable_book_nav_filtering","Search__enable_dynamic_content_confidential_banner","Significatio__enable_footprints","Experiments__reqs_query_experiments","Significatio__enable_experiment_id_caching","Profiles__enable_awarding_url","Profiles__enable_profile_communities","Badges__enable_delete_badges","Profiles__enable_developer_profiles_dashboard_recommendations","Profiles__enable_suggested_interests","MiscFeatureFlags__developers_footer_dark_image","Cloud__enable_cloud_shell","Search__enable_page_map","MiscFeatureFlags__emergency_css","Profiles__require_profile_eligibility_for_signin","Badges__enable_drag_and_drop_badges","ContentExcellence__enable_verified_date","Cloud__enable_cloudx_experiment_ids","Cloud__enable_cloud_shell_fte_user_flow","Search__enable_faceted_search","Search__enable_devsite_serp","MiscFeatureFlags__enable_explain_this_code","SignIn__enable_auto_signin_oauth","Cloud__enable_free_trial_server_call","Profiles__enable_public_developer_profiles","MiscFeatureFlags__enable_project_variables"],null,null,"AIzaSyBLEMok-5suZ67qRPzx0qUtbnLmyT_kCVE","https://developerscontentserving-pa.googleapis.com","AIzaSyCM4QpTRSqP5qI4Dvjt4OAScIN8sOUlO-k","https://developerscontentsearch-pa.googleapis.com",2]')
  
</script>
    <devsite-a11y-announce></devsite-a11y-announce>
  </body>
</html>